Home TensorFlow installation results in ImportError: No module named tensorflow
Reply: 1

TensorFlow installation results in ImportError: No module named tensorflow

Eddy
1#
Eddy Published in 2016-01-21 08:35:48Z

I'm trying to get TensorFlow to work on my Mac (OSX El Capitan 10.11.2). I tried the pip install from the setup guide and also followed the instructions in the accepted answer here.

In both cases I am able to successfully activate the virtualenv and my prompt changes to tensorflow. Python works fine, I'm able to do simple computations on the command line. But when I try to import tensorflow:

import tensorflow as tf

I repeatedly get this error:

ImportError: No module named tensorflow

Any help would be appreciated.

Eric C. Bohn
2#
Eric C. Bohn Reply to 2016-06-15 14:35:03Z

I had the issue reported in the original question. Python worked fine, I followed the installation steps on the Tensforflow website, and got "No module named tensorflow."

Re-installing python via brew, and re-installing pip as a result, fixed it. I didn't need to uninstall anything, just the line below along with the normal pip install from the tensorflow installation document afterwards:

brew install python
You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.301746 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO