Collectives™ on Stack Overflow
Find centralized, trusted content and collaborate around the technologies you use most.
Learn more about Collectives
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Learn more about Teams
Python 3.5.4 |Anaconda, Inc.| (default, Oct 5 2017, 02:58:14)
Type "copyright", "credits" or "license" for more information.
IPython 6.1.0 -- An enhanced Interactive Python.
Traceback (most recent call last):
File "<ipython-input-1-c6f06aebce6b>", line 1, in <module>
runfile('/Users/connorwoodford/Desktop/Deep NLP A-Z/chatbot.py', wdir='/Users/connorwoodford/Desktop/Deep NLP A-Z')
File "/Users/connorwoodford/anaconda3/envs/chatbot/lib/python3.5/site-packages/spyder/utils/site/sitecustomize.py", line 710, in runfile
execfile(filename, namespace)
File "/Users/connorwoodford/anaconda3/envs/chatbot/lib/python3.5/site-packages/spyder/utils/site/sitecustomize.py", line 101, in execfile
exec(compile(f.read(), filename, 'exec'), namespace)
File "/Users/connorwoodford/Desktop/Deep NLP A-Z/chatbot.py", line 7, in <module>
import tensorflow as tf
ImportError: No module named 'tensorflow'
–
a. import sys
b. sys.executable
3. Copy and keep the output of the output from the last command somewhere
4. Open Spyder
a. Go to Tools > Preferences > Python interpreter
b. Select the option Use the following Python interpreter
c. Paste the copied output of the command
5. Go to the consoles option in Spyder
a. Choose Open Ipython console from options
b. It might as for installing ipykernal, which you can do with
i. pip / conda install ipykernal cloudpickle
c. Now you can use Keras, tensorflow without any error I believe.
It worked for me!
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.