tripleDOT tripleDOT - 9 months ago 103
Python Question

Tensorflow and Anaconda on Ubuntu?

On my Ubuntu 14.04, I have installed tensorflow, using "pip", as specified in the Tensorflow Installation instructions and I made sure it was working by importing it in python and it did work.

Then, I installed Anaconda and it changed my .bashrc file by adding the following line to it:

export PATH="/home/sonny/anaconda2/bin:$PATH"

But because of this change, now it looks into the PATH above, which doesn't contain tensorflow. now I can't import tensorflow in my python code.

What is the proper way to extend the $PATH environment variable so that it stays using everything from anaconda2 but it becomes able to import "tensorflow"?


I solved the problem but in a different way! I found a link where the tensorflow.whl files were converted to conda packages, so I went ahead and installed it using the command:

conda install -c tensorflow

and it worked, since the $PATH points to anaconda packages, I can import it now!

Source is here