0

I'm trying to install tensorflow in virtualenv

after installing I get the message that tensorflow has been installed in /home/username/anaconda/lib/python2.7/site-packages

how can I get it installed in site-packages of virtual environment?

EDIT

I'm using ubuntu 14.04.2 LTS
and following are the sequence of instructions I executed

sudo apt-get install python-pip python-dev python-virtualenv

virtualenv --system-site-packages ~/tensorflow

cd ~/tensorflow

source bin/activate

I encountered tensorflow-0.5.0-py2-none-any.whl is not a supported wheel on this platform.

when trying to execute

pip install --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.5.0-cp27-none-linux_x86_64.whl

so I had to follow instuction from https://askubuntu.com/questions/695981/platform-not-supported-for-tensorflow-on-ubuntu-14-04-2

so after executing

python2.7 -m pip install https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.5.0-cp27-none-linux_x86_64.whl

I got the output

Requirement already up-to-date: six>=1.10.0 in /home/sasidhar/anaconda/lib/python2.7/site-packages (from tensorflow==0.5.0)
Requirement already up-to-date: numpy>=1.9.2 in /home/sasidhar/anaconda/lib/python2.7/site-packages (from tensorflow==0.5.0)
Installing collected packages: tensorflow
Installing collected packages: tensorflow
Found existing installation: tensorflow 0.5.0
Uninstalling tensorflow-0.5.0:
  Successfully uninstalled tensorflow-0.5.0
Successfully installed tensorflow-0.5.0

so as I'm trying to install in virtual environment, I want to install tensorflow locally in virtual environment rather than in /home/sasidhar/anaconda/lib/python2.7/site-packages

Community
  • 1
  • 1
Sasidhar Boddeti
  • 1,214
  • 1
  • 11
  • 22

1 Answers1

0

It seems you already have anaconda installed. anaconda comes with an environment management system, already (see here). Having two systems (virtualenv and anaconda) seems to mess up your python paths.

If you would like to use conda environments, then you do not need to install virtualenv. Just create a new conda env for your tensorflow installation.

If you still have troubles with your installation, you can have a look at my answer here. It's for Mac OS X, but the steps described should work on any system.

Community
  • 1
  • 1
gessulat
  • 532
  • 4
  • 13