I understand this may be an old question, but still I cannot find solution from off-the-shelf Q$A. Here is the problem:
I am following Udacity "Machine Learning" and its assignments, and need use iPythonNotebook & tensorflow. Details : https://github.com/Omarito2412/udacity-deeplearning
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
Thanks. Any suggestions ?
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
After I tried Anaconda-installation (I was using the other installation methods, which are all shown in the link below) https://github.com/tensorflow/tensorflow/blob/master/tensorflow/g3doc/get_started/os_setup.md#anaconda-installation It worked ...
Further, on terminal activate tensorflow
>>> source activate tensorflow
before open iPython Notebook
>>> ipython notebook
At last, I have to restart my macbook to make it work....
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With