我正在尝试使用pip安装TensorFlow:
$ pip install tensorflow --user
Collecting tensorflow
Could not find a version that satisfies the requirement tensorflow (from versions: )
No matching distribution found for tensorflow
我做错了什么?到目前为止,我使用Python和pip没有任何问题。
我正在尝试使用pip安装TensorFlow:
$ pip install tensorflow --user
Collecting tensorflow
Could not find a version that satisfies the requirement tensorflow (from versions: )
No matching distribution found for tensorflow
我做错了什么?到目前为止,我使用Python和pip没有任何问题。
当前回答
我也面临着同样的问题。我尝试了下面的方法,它奏效了。 安装Mac OS X, anaconda python 2.7
PIP卸载tensorflow export TF_BINARY_URL=<从http://tflearn.org/installation/>得到正确的url pip install——upgrade $TF_BINARY_URL
安装tensorflow-1.0.0
其他回答
当我试图在我的Mac上安装(使用Python 2.7)时,我遇到了同样的错误。根据Yash Kumar Verma在本页上的不同回答,我在这里给出的类似解决方案似乎也适用于Windows 8.1上的Python 3
解决方案
第一步:进入TensorFlow安装页面的TensorFlow Python包的URL部分,复制相关链接的URL用于您的Python安装。
第二步:打开终端/命令提示符,执行以下命令: PIP install -upgrade[在这里粘贴复制的url链接]
所以对我来说是这样的: PIP安装——升级https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.2.0-py2-none-any.whl
更新(2017年7月21日):我和其他一些在Windows机器上运行Python 3.6的人尝试了这一点,他们必须将第2步中的行更改为: Python -m PIP install[在这里粘贴复制的url链接]
更新(2018年7月26日):对于Python 3.6.2(不是3.7,因为在TF文档中的3.6.2中),您还可以在步骤2中使用pip3 install——upgrade[粘贴复制的URL]。
来自tensorflow网站:“你需要pip 8.1或更高版本才能运行以下命令”。运行这个命令来升级你的pip,然后尝试再次安装tensorflow:
pip install --upgrade pip
在Windows中安装TensorFlow的URL,下面是URL。这对我来说很有效。
python -m pip install --upgrade https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-0.12.0-py3-none-any.whl
也有类似的问题
结果是默认的GPU版本,我已经在一个没有GPU的服务器上安装了它。
pip install --upgrade tensorflow-cpu
成功了
对于窗口,您可以使用以下命令
python3 -m pip install --upgrade https://storage.googleapis.com/tensorflow/windows/gpu/tensorflow_gpu-2.3.0-cp38-cp38-win_amd64.whl