简体   繁体   English

导入Tensorflow时Jupyter内核死亡,Jupyter Notebook出现问题

[英]Jupyter kernel dies when importing Tensorflow, trouble with jupyter notebook

I use Anaconda version 4.5.8 with Python 3.6.6. 我将Anaconda版本4.5.8与Python 3.6.6结合使用。 After installing tensorflow by using the following commands from the tensorflow website: 在tensorflow网站上使用以下命令安装tensorflow之后:

conda create -n tensorflow pip python=3.5
activate tensorflow
pip install --ignore-installed --upgrade tensorflow

I've done as they have instructed and yet my kernel dies whenever I import tensorflow as tf in my Jupyter notebook. 我已经按照他们的指示完成了,但是每当我在Jupyter笔记本import tensorflow as tf时,我的内核就会死亡。

I've also looked at other solutions on this website and uninstalled all of tensorflow and installed pip install tensorflow==1.5 . 我也在该网站上查看了其他解决方案,并卸载了所有tensorflow并安装了pip install tensorflow==1.5 No matter my kernel still dies. 不管我的内核仍然死了。

I've created another new environment in Anaconda and installed pip install tensorflow==1.51 and still my kernel dies. 我在Anaconda中创建了另一个新环境,并安装了pip install tensorflow==1.51 ,但我的内核仍然死了。 I've downgraded to python2.7 , and my kernel dies. 我已经降级到python2.7 ,我的内核死了。

I've downgraded my tensorflow and my python and the kernel still ends up dead. 我将我的tensorflow和python降级了,内核仍然死了。 Can anyone find a solution to this? 有人可以找到解决方案吗?

Edit: Rechecked solutions again, others don't work. 编辑:再次检查解决方案,其他无效。 Edit: Tried environment changing as commenter suggested, didn't work. 编辑:尝试更改环境,如评论者建议的那样,不起作用。

I had the same problem (although it worked problem-free previously): I could do anything in Python as long as I didn't use tensorflow. 我遇到了同样的问题(尽管以前没有问题):只要不使用tensorflow,我就可以在Python中做任何事情。 Which is a bit difficult if you're trying to study convolutional networks. 如果您要研究卷积网络,这将有些困难。 Installing tensorflow 1.5 (with pip3) instead of the current tensorflow did not help me either, but after trying conda instead of pip it worked like a charm! 安装tensorflow 1.5(使用pip3)而不是当前的tensorflow也无济于事,但是尝试使用conda而不是pip后,它就像一个魅力!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM