我正在尝试使用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

其他回答

正确的安装方法如下所述

$ pip install --upgrade TF_BINARY_URL   # Python 2.7
$ pip3 install --upgrade TF_BINARY_URL  # Python 3.N

从张量流官方主页找到正确的TF_BINARY_URL

试试这个:

export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-0.12.1-py3-none-any.whl
pip3 install --upgrade $TF_BINARY_URL

来源:https://www.tensorflow.org/get_started/os_setup(页面已不存在)

更新2/23/17 文档移至:https://www.tensorflow.org/install

如果您尝试了上面的解决方案,但没有解决问题,可能是因为版本不一致。

我安装了python 3.9,无法用pip安装tensorflow。

然后我卸载了3.9,然后安装了3.8.7,成功…tensorflow支持的最大版本是3.8。X(2021年) 所以,检查你的python版本是否与当前的tensorflow兼容。

如果你试图在Windows上安装Anaconda Tensorflow,一个免费的建议是请卸载Anaconda,并从发布页面下载一个64位的Python版本,以amd64结尾。对我来说,它是python-3.7.8-amd64.exe

然后按照Tensorflow官方网站上的说明在虚拟环境中安装Tensorflow。

更新时间:2016年11月28日:TensorFlow现在可以在PyPI中使用,从0.12版本开始。你可以打字

pip install tensorflow

…或…

pip install tensorflow-gpu

...分别安装TensorFlow的cpu加速版或gpu加速版。


之前的回答:TensorFlow还没有在PyPI存储库中,所以你必须为你的操作系统和Python版本指定适当的“轮子文件”的URL。

TensorFlow网站上列出了支持的配置的完整列表,但例如,要在Linux上仅使用CPU安装Python 2.7的0.10版本,您将键入以下命令:

$ pip install https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.10.0rc0-cp27-none-linux_x86_64.whl