没有名为张量流的模块-iPython Notebook
我知道这可能是个老问题,但仍然无法从现成的Q $ A中找到解决方案.问题出在这里:
I understand this may be an old question, but still I cannot find solution from off-the-shelf Q$A. Here is the problem:
我正在遵循 Udacity 机器学习"及其作业,并且需要使用 iPythonNotebook& tensorflow .详细信息: https://github.com/Omarito2412/udacity-deeplearning
I am following Udacity "Machine Learning" and its assignments, and need use iPythonNotebook & tensorflow. Details : https://github.com/Omarito2412/udacity-deeplearning
Assignment2需要张量流.顺便说一句,我已经安装了Anaconda , 已经在 Macbook 的同一台计算机上使 tensorflow在Pycharm上运行,但是不知道如何使其在iPythonNotebook环境下运行.
Assignment2 requires tensorflow. BTW, I already installed Anaconda, already made tensorflow working on Pycharm on the same computer which is Macbook, but do not know how to make it work on iPythonNotebook environment.
代码非常简单,如下所示:
The codes are quite simple, as follows:
import numpy as np
import tensorflow as tf
from six.moves import cPickle as pickle
from six.moves import range
,错误消息如下:
ImportError Traceback (most recent call last)
<ipython-input-1-0970743dd90d> in <module>()
2 # before proceeding further.
3 import numpy as np
----> 4 import tensorflow as tf
5 from six.moves import cPickle as pickle
6 from six.moves import range
ImportError: No module named tensorflow
谢谢.有什么建议吗?
PS:我在两台MacBook上都遇到了这个问题,并且两台MacBook都能很好地运行Pycharm + tensorflow.
PS: I have this problem on two MacBooks, and both MacBooks run Pycharm+tensorflow well.
您应停用并重新激活环境
You should deactivate and re-activate the environment
source deactivate tensorflow
source activate tensorflow