2015-11-11 53 views
0

我试图安装我得到tensorflow已经安装在 /home/username/anaconda/lib/python2.7/site-packagestensorflow正在安装蟒蛇/ lib目录/ python2.7/site-packages中

的消息后,在virtualenv

安装tensorflow我怎样才能让它安装在虚拟环境的网站包中?

编辑

我使用Ubuntu 14.04.2 LTS
及以下各指令序列我执行

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

virtualenv --system-site-packages ~/tensorflow

cd ~/tensorflow

source bin/activate

我遇到tensorflow-0.5.0-py2-none-any.whl is not a supported wheel on this platform.

试图执行

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

的时候,所以我不得不这样执行

python2.7 -m pip install https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.5.0-cp27-none-linux_x86_64.whl后跟随instuction从https://askubuntu.com/questions/695981/platform-not-supported-for-tensorflow-on-ubuntu-14-04-2

我得到的输出

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 

使我试图在虚拟环境中安装,我想在虚拟环境中,而不是在/home/sasidhar/anaconda/lib/python2.7/site-packages

+0

你是怎么试图安装它,什么操作系统?这不是一个猜测的地方。 –

+0

对不起,先生, 添加了我在安装时遵循的步骤 –

回答

0

本地安装tensorflow看来你已经有蟒蛇安装。 anaconda已经配备了环境管理系统(请参阅here)。有两个系统(virtualenv和anaconda)似乎搞乱了你的python路径。

如果你想使用conda环境,那么你不需要安装virtualenv。只需为您的tensorflow安装创建一个新的conda环境。

如果您的安装仍然存在问题,您可以查看我的回答here。它适用于Mac OS X,但所描述的步骤适用于任何系统。