Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/tensorflow/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
使用python 3安装TensorFlow有哪些要求?_Python_Tensorflow - Fatal编程技术网

使用python 3安装TensorFlow有哪些要求?

使用python 3安装TensorFlow有哪些要求?,python,tensorflow,Python,Tensorflow,我试图用启用的GPU安装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

我试图用启用的GPU安装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进行了测试,看看它是否有效:

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
,我不知道它为什么需要它。从这个错误来看,我不清楚这个错误是否是由于pip造成的,或者错误是什么,或者是什么原因造成的

不幸的是,我不知道如何在连接到的集群中安装pip3,因为我没有安装它的特权。我确实尝试过用正常的pip运行这个命令,但它似乎不起作用。有没有办法解决这个问题?或者安装pip3之类的东西?我很高兴澄清允许我在集群上使用哪些工具(比如允许我使用普通pip和conda环境)


更新:

实际上,它似乎在为Python3使用pip版本(尽管该命令不被称为pip3,但不确定这是否有区别,但我应该提到这一点):


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

尝试使用
/path/to/python-mpip[…]
以确保使用的是正确的
pip

重命名您的
~/.local
文件夹,因为即使它们与安装无关,conda venv也会尝试使用它们


如果所有其他操作都失败,请尝试
pip安装--用户[…]

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

尝试使用
/path/to/python-mpip[…]
以确保使用的是正确的
pip

重命名您的
~/.local
文件夹,因为即使它们与安装无关,conda venv也会尝试使用它们

如果所有其他操作都失败,请尝试
pip安装--user[…]

(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)