我正在尝试使用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没有任何问题。
当前回答
试试这个:
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
其他回答
告诉你具体是什么问题的方法是:
PIP install -vvv tensorflow
这将向您显示可用的轮子文件以及它们不匹配的原因。
如果你执行pip debug -verbose,它会显示所有兼容的标签。
在我的例子中,我试图在一个多通道ubuntu实例的m1 mac上安装tensorflow,而需要https://pypi.org/project/tensorflow-aarch64/
更新时间: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
对于窗户,这个方法对我很有效,
从这个链接下载车轮。然后从命令行导航到车轮所在的下载文件夹,只需键入以下命令-
PIP安装tensorflow-1.0.0-cp36-cp36m-win_amd64.whl
目前PIP没有32位版本的tensorflow,当我卸载python 32位并安装x64时,它可以工作
如果你试图在windows机器上安装它,你需要有64位版本的python 3.5。这是真正安装它的唯一方法。来自网站:
TensorFlow仅支持Windows上的64位Python 3.5。我们已经用以下Python发行版测试了pip包: Anaconda的Python 3.5 Python 3.5来自python.org。
你可以从这里下载合适的python版本(确保你选择了一个写着“Windows x86-64”的版本)
现在,您应该能够使用pip install tensorflow或python -m pip install tensorflow进行安装(如果同时安装了python2和python3,请确保您使用的是从python3安装的正确pip)
请记住安装Anaconda 3-5.2.0作为最新版本,即3-5.3.0,包含Tensorflow不支持的python 3.7版本。