Debug | ERROR: Could not find a version that satisfies the requirement tensorflow

报错信息:
安装pip install tensorflow==1.15.4的时候
遇到了如下报错:

ERROR: Could not find a version that satisfies the requirement tensorflow==1.15.4

问题分析:
如果排除网络问题后,多半就是版本兼容问题了,有几个可能:
Tensorflow 和 Python版本匹配
可以参见这篇博客Tensorflow | TF与Keras版本对应,可以看到Tensorflow与Python版本对应,主要都是Python3.6-3.7版本。

Framework(TF) Env name (–env parameter) Description Docker Image Packages and Nvidia Settings
TensorFlow 2.2 tensorflow-2.2 TensorFlow 2.2.0 + Keras 2.3.1 on Python 3.7. floydhub/tensorflow TensorFlow-2.2
TensorFlow 2.1 tensorflow-2.1 TensorFlow 2.1.0 + Keras 2.3.1 on Python 3.6. floydhub/tensorflow TensorFlow-2.1
TensorFlow 2.0 tensorflow-2.0 TensorFlow 2.0.0 + Keras 2.3.1 on Python 3.6. floydhub/tensorflow TensorFlow-2.0
TensorFlow 1.15 tensorflow-1.15 TensorFlow 1.15.0 + Keras 2.3.1 on Python 3.6. floydhub/tensorflow TensorFlow-1.15
TensorFlow 1.14 tensorflow-1.14 TensorFlow 1.14.0 + Keras 2.2.5 on Python 3.6. floydhub/tensorflow TensorFlow-1.14
TensorFlow 1.13 tensorflow-1.13 TensorFlow 1.13.0 + Keras 2.2.4 on Python 3.6. floydhub/tensorflow TensorFlow-1.13
TensorFlow 1.12 tensorflow-1.12 TensorFlow 1.12.0 + Keras 2.2.4 on Python 3.6. floydhub/tensorflow TensorFlow-1.12
tensorflow-1.12:py2 TensorFlow 1.12.0 + Keras 2.2.4 on Python 2. floydhub/tensorflow
TensorFlow 1.11 tensorflow-1.11 TensorFlow 1.11.0 + Keras 2.2.4 on Python 3.6. floydhub/tensorflow TensorFlow-1.11
tensorflow-1.11:py2 TensorFlow 1.11.0 + Keras 2.2.4 on Python 2. floydhub/tensorflow
TensorFlow 1.10 tensorflow-1.10 TensorFlow 1.10.0 + Keras 2.2.0 on Python 3.6. floydhub/tensorflow TensorFlow-1.10
tensorflow-1.10:py2 TensorFlow 1.10.0 + Keras 2.2.0 on Python 2. floydhub/tensorflow
TensorFlow 1.9 tensorflow-1.9 TensorFlow 1.9.0 + Keras 2.2.0 on Python 3.6. floydhub/tensorflow TensorFlow-1.9
tensorflow-1.9:py2 TensorFlow 1.9.0 + Keras 2.2.0 on Python 2. floydhub/tensorflow
TensorFlow 1.8 tensorflow-1.8 TensorFlow 1.8.0 + Keras 2.1.6 on Python 3.6. floydhub/tensorflow TensorFlow-1.8
tensorflow-1.8:py2 TensorFlow 1.8.0 + Keras 2.1.6 on Python 2. floydhub/tensorflow
TensorFlow 1.7 tensorflow-1.7 TensorFlow 1.7.0 + Keras 2.1.6 on Python 3.6. floydhub/tensorflow TensorFlow-1.7
tensorflow-1.7:py2 TensorFlow 1.7.0 + Keras 2.1.6 on Python 2. floydhub/tensorflow
TensorFlow 1.5 tensorflow-1.5 TensorFlow 1.5.0 + Keras 2.1.6 on Python 3.6. floydhub/tensorflow TensorFlow-1.5
tensorflow-1.5:py2 TensorFlow 1.5.0 + Keras 2.1.6 on Python 2. floydhub/tensorflow
TensorFlow 1.4 tensorflow-1.4 TensorFlow 1.4.0 + Keras 2.0.8 on Python 3.6. floydhub/tensorflow
tensorflow-1.4:py2 TensorFlow 1.4.0 + Keras 2.0.8 on Python 2. floydhub/tensorflow
TensorFlow 1.3 tensorflow-1.3 TensorFlow 1.3.0 + Keras 2.0.6 on Python 3.6. floydhub/tensorflow
tensorflow-1.3:py2 TensorFlow 1.3.0 + Keras 2.0.6 on Python 2. floydhub/tensorflow
TensorFlow 1.2 tensorflow-1.2 TensorFlow 1.2.0 + Keras 2.0.6 on Python 3.5. floydhub/tensorflow
tensorflow-1.2:py2 TensorFlow 1.2.0 + Keras 2.0.6 on Python 2. floydhub/tensorflow
TensorFlow 1.1 tensorflow TensorFlow 1.1.0 + Keras 2.0.6 on Python 3.5. floydhub/tensorflow
tensorflow:py2 TensorFlow 1.1.0 + Keras 2.0.6 on Python 2. floydhub/tensorflow
TensorFlow 1.0 tensorflow-1.0 TensorFlow 1.0.0 + Keras 2.0.6 on Python 3.5. floydhub/tensorflow
tensorflow-1.0:py2 TensorFlow 1.0.0 + Keras 2.0.6 on Python 2. floydhub/tensorflow
TensorFlow 0.12 tensorflow-0.12 TensorFlow 0.12.1 + Keras 1.2.2 on Python 3.5. floydhub/tensorflow
tensorflow-0.12:py2 TensorFlow 0.12.1 + Keras 1.2.2 on Python 2. floydhub/tensorflow

Python 位数对应
博主就是遇见了这个问题,Tensorflow 暂不支持 32 位,windows中需要Python 64位的
cmd中输入python就可以看到自己的版本和位数。
如果是在jupyter notebook中

import sys
sys.version
'3.8.5 (default, Sep  3 2020, 21:29:08) [MSC v.1916 64 bit (AMD64)]'

如果位数不符合,需要重新下载,或者搭建虚拟环境~

解决方案:
在找到自己对应版本和位数后,要么重新装,要么安装虚拟环境,比如conda create -n tf python=3.7,然后再安装tensorflow多半就没问题了

你可能感兴趣的:(#,TensorFlow,tensorflow,python,pip)