On Ubuntu 14.04, I have installed Anaconda, which I use as my main Python interpreter. I now want to install the TensorFlow library and use this via Anaconda. So, I downloaded the relevant
pip install foo.whl
ImportError: No module named 'tensorflow'
You can try the similar answer here: http://stackoverflow.com/a/33698750/5573572
Pretty much do these steps:
1. Uninstall TensorFlow from pip: pip uninstall tensorflow
Do the above to avoid conflicts.
2. Install Python 3 in a virtual environment (version 0.7.1 as of this writing): conda create -n <environment_name> python==3.5.1 3. Activate your virtual environment (do this every time you want to use TensorFlow): source activate <environment_name> 4. Install a Conda version of TensorFlow in that environment (version 0.7.1 as of this writing): conda install -c https://conda.anaconda.org/jjhelmus tensorflow
Remember to change "environment_name" to whatever you want to name your environment. After these, you should hopefully be able to import tensorflow. If not, then anaconda might be having trouble installing TensorFlow's dependencies.
I'll run this on my machine to check real quick :p. I have confirmed that this works.
A possible reason that your installation attempt was not working is because Ubuntu 14.04 has Python 2.7 installed, in which many system programs depend on for the time being. As an aside, the Ubuntu development team is working on porting all of those programs to use Python 3 instead: https://wiki.ubuntu.com/Python/Python35Transition
Update: added instructions to include creating a virtual environment. The virtual environment helps because it allows you to use the Python commands within the environment instead of any system Python commands. So, commands like "pip" and "python" will use the ones in the environment, which also contains the TensorFlow libraries. To get out of the environment, do: