我正在尝试使用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没有任何问题。
当前回答
对于窗户,这个方法对我很有效,
从这个链接下载车轮。然后从命令行导航到车轮所在的下载文件夹,只需键入以下命令-
PIP安装tensorflow-1.0.0-cp36-cp36m-win_amd64.whl
其他回答
试试这个:
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,然后安装TensorFlow,如下所示
# Requires the latest pip
pip install --upgrade pip
# Current stable release for CPU and GPU
pip install tensorflow
如果你使用蟒蛇提示,那么试试这个
conda install -c anaconda tensorflow-gpu
您需要使用正确版本的Python和pip。
在Windows 10上,使用Python 3.6。X版本我也面临同样的问题,然后在仔细检查后,我注意到我的64位机器上安装了Python-32位。记住TensorFlow只兼容64位的Python安装,不兼容32位的Python版本
如果我们从python.org下载Python,默认安装为32位。所以我们必须手动下载64位安装程序来安装Python 64位。然后将以下内容添加到PATH环境中。
C:\Users\AppData\Local\Programs\Python\Python36
C:\Users\AppData\Local\Programs\Python\Python36\Scripts
然后在命令提示符下执行gpupdate /Force。如果Python命令不能用于64位,则重新启动计算机。
然后在命令提示符下运行python。它应该显示64位。
C:\Users\YOURNAME>python
Python 3.6.3 (v3.6.3:2c5fed8, Oct 3 2017, 18:11:49) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
然后执行以下命令安装tensorflow CPU版本(推荐)
pip3 install --upgrade tensorflow
2020年10月更新:
Tensorflow现在支持Python 3.5。通过Python 3.8。X,但您仍然必须使用64位版本。
如果需要在同一台机器上运行多个版本的Python,可以使用虚拟环境来帮助管理它们。
我也遇到了同样的问题,问题是我使用的AWS机器有ARM处理器!
我必须手动构建张量流
来自tensorflow网站:“你需要pip 8.1或更高版本才能运行以下命令”。运行这个命令来升级你的pip,然后尝试再次安装tensorflow:
pip install --upgrade pip