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

其他回答

也有类似的问题

结果是默认的GPU版本,我已经在一个没有GPU的服务器上安装了它。

pip install --upgrade tensorflow-cpu

成功了

摘自tensorflow网站 https://www.tensorflow.org/install/install_windows

Installing with native pip If the following version of Python is not installed on your machine, install it now: Python 3.5.x from python.org TensorFlow only supports version 3.5.x of Python on Windows. Note that Python 3.5.x comes with the pip3 package manager, which is the program you'll use to install TensorFlow. To install TensorFlow, start a terminal. Then issue the appropriate pip3 install command in that terminal. To install the CPU-only version of TensorFlow, enter the following command:

C:\> pip3 install --upgrade tensorflow
To install the GPU version of TensorFlow, enter the following command:

C:\> pip3 install --upgrade tensorflow-gpu

更新时间: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

我在conda上安装了tensorflow,但似乎在windows上不起作用,但最终这个命令在cmd上可以正常工作。

 python.exe -m pip install --upgrade https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-0.12.0-py3-none-any.whl

当我试图在anaconda包中安装tensorflow时,我遇到了同样的错误。 经过一番努力,我终于找到了一种安装任何包都不会出错的简单方法。 首先使用这个命令在anaconda管理员中创建一个环境

conda create -n packages

现在激活环境

activate packages 

试着跑步

pip install tensorflow 

在成功安装之后,我们需要让jupyter notebook可以访问这个环境。 为此,您需要使用这个命令安装一个名为ipykernel的包

pip install ipykernel

安装ipykernel后,输入以下命令

python -m ipykernel install --user --name=packages

运行此命令后,该环境将被添加到jupyter notebook中 就是这样。 只要打开你的jupyter笔记本,点击新的笔记本,你就能看到你的环境。选择该环境并尝试导入tensorflow,如果你想安装任何其他包,只需激活该环境并安装这些包,并在你的jupyter中使用该环境