[英]Can't import tensorflow in Python 3.6.6
I installed tensorflow with pip3 install tensorflow
and then I opened the terminal typed python
and import tensorflow
.我用pip3 install tensorflow
然后我打开终端输入python
并import tensorflow
。
But when I hit Enter it gives me an Error:但是当我按 Enter 时,它给了我一个错误:
Invalid machine command (memory dump written)
I already reinstalled tensorflow multiple times but it won't work.我已经多次重新安装 tensorflow 但它不起作用。 Could someone please help me?有人可以帮我吗?
Not sure what's causing your problem exactly but if you search for same problem and possible solutions online, you reach here: https://github.com/tensorflow/tensorflow/issues/17411 .不确定究竟是什么导致了您的问题,但如果您在线搜索相同的问题和可能的解决方案,请访问此处: https : //github.com/tensorflow/tensorflow/issues/17411 。
Basically a solution would be to install an earlier tensorflow version.基本上一个解决方案是安装较早的 tensorflow 版本。
Try:尝试:
pip uninstall tensorflow
pip install tensorflow==1.5
conda create -n tensorflow python=3.6
使用conda create -n tensorflow python=3.6
创建一个 virtualenvsource activate tensorflow
2.5 使用source activate tensorflow
(tensorflow)name@name$
type conda install tensorflow
在 virtualenv (tensorflow)name@name$
输入conda install tensorflow
python3
and then import tensorflow
安装后键入(始终在 virtualenv 中) python3
然后import tensorflow
exit
to reactivate it type source activate tensorflow
要停用 virtualenv 类型exit
以重新激活它,请键入source activate tensorflow
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.