Tensorflow模块存在但笔记本电脑出错

时间:2017-05-17 10:36:24

标签: python tensorflow

您好我正在使用Jupyter笔记本来运行我的python脚本。我已经完成了安装tensorflow的所有步骤。当我列出env时,我看到安装了tensorflow但是当我使用张量流编写脚本时。我收到以下错误。

ImportError                               Traceback (most recent call last)
<ipython-input-1-b2d6c7d62f65> in <module>()
      2 import numpy as np
      3 #import tflearn
----> 4 import tensorflow as tf
      5 import tflearn
      6 #from tflearn.data_utils import to_categorical

ImportError: No module named 'tensorflow'

任何人都可以请求如何调试

我已按照以下步骤操作 1.conda create --name test python = 3.5 2.激活测试 3.conda安装numpy matplotlib pandas jupyter notebook 4. conda install tensorflow scipy

所有安装都是成功的。除了在hdf5我得到错误说使用conda&gt; revuild 2.0

1 个答案:

答案 0 :(得分:0)

如果您尝试在ipython中导入tensorflow,还应确保ipython安装在同一环境中。如果你跑

ipython notebook

这将启动默认的ipython(/ usr / bin / ipython)。你不想要那个。所以,改为运行venv / bin / ipython