2016-08-29 16 views
1

我正试图在启用GPU的情况下安装TensorFlow。为此,我使用the official site的说明书。首先,我建立了我的环境:用python 3安装TensorFlow有什么要求?

conda create --name tf_py3_tf_gpu python=3.5 

然后我激活了我的环境,并得到了版本适合我的机器:

export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/mac/gpu/tensorflow-0.10.0rc0-py3-none-any.whl 

然后我继续跑PIP3安装:

(tf_py3_tf_gpu)user~/envs/tf_py3_tf_gpu/lib/python3.5/site-packages $ pip3 install --upgrade $TF_BINARY_URL 

但错误:

-bash: pip3: command not found 

但是,我连接的群集不允许我使用apt-install来安装pip3(如果有方法将其安装到conda环境或某种风格的应用程序,那将非常棒!我被允许做,而且我确实有普通的点子)。

反正我继续与正常PIP这样做是为了看看它的工作:

pip install --ignore-installed --upgrade $TF_BINARY_URL 

然而,它未能与消息:

(tf_py3_tf_gpu)user~/envs/tf_py3_tf_gpu/lib/python3.5/site-packages $ pip install --upgrade $TF_BINARY_URL 
Collecting tensorflow==0.10.0rc0 from https://storage.googleapis.com/tensorflow/mac/gpu/tensorflow-0.10.0rc0-py3-none-any.whl 
    Using cached https://storage.googleapis.com/tensorflow/mac/gpu/tensorflow-0.10.0rc0-py3-none-any.whl 
Requirement already up-to-date: numpy>=1.10.1 in /home/user/envs/tf_py3_tf_gpu/lib/python3.5/site-packages (from tensorflow==0.10.0rc0) 
Requirement already up-to-date: six>=1.10.0 in /home/user/envs/tf_py3_tf_gpu/lib/python3.5/site-packages (from tensorflow==0.10.0rc0) 
Collecting protobuf==3.0.0b2 (from tensorflow==0.10.0rc0) 
    Using cached protobuf-3.0.0b2-py2.py3-none-any.whl 
Requirement already up-to-date: wheel>=0.26 in /home/user/envs/tf_py3_tf_gpu/lib/python3.5/site-packages (from tensorflow==0.10.0rc0) 
Collecting setuptools (from protobuf==3.0.0b2->tensorflow==0.10.0rc0) 
    Using cached setuptools-26.0.0-py2.py3-none-any.whl 
Installing collected packages: setuptools, protobuf, tensorflow 
    Found existing installation: setuptools 25.1.6 
Cannot remove entries from nonexistent file /home/user/envs/tf_py3_tf_gpu/lib/python3.5/site-packages/easy-install.pth 

出于某种原因需要/home/user/envs/tf_py3_tf_gpu/lib/python3.5/site-packages/easy-install.pth我不知道为什么它需要。如果错误是由点引起的,或者错误是由什么引起的,或者是由什么引起的,那么从这个错误中我不清楚。

不幸的是,我不知道如何在我连接的群集中安装pip3,因为我没有安装它的特权。我曾尝试用普通的点子来运行命令,但似乎并不奏效。任何想法如何解决这一问题?或者安装pip3或其他任何类型的软件?我很高兴澄清我可以在集群上使用哪些工具(例如,我可以使用普通的pip并使用conda环境)。


更新:

事实上,它似乎是使用PIP版本巨蟒-3(即使该命令不叫PIP 3,不知道是否有差别,但我应该提到这一点) :

(tf_py3_tf_gpu)user/path $ pip --version 
pip 8.1.2 from /home/user/envs/tf_py3_tf_gpu/lib/python3.5/site-packages (python 3.5) 

回答

0

验证是否pip是不是在你的virtualenv的bin文件夹。

尝试使用/path/to/python -m pip [...],以确保您使用的是正确pip

重命名~/.local文件夹,因为畅达VENV尝试使用他们,即使他们是无关的安装

尝试pip install --user [...],如果一切都失败。