pip install tensorflow报错ERROR: Could not find a version that satisfies the requirement tensorflow (f

这里写目录标题

  • 报错内容
  • 解决方法
    • 其他方法
  • 原因分析

报错内容

pip3 install tensorflow

输入上述命令安装tensorflow后出现下面的报错

ERROR: Could not find a version that satisfies the requirement tensorflow (from versions: none)
ERROR: No matching distribution found for tensorflow

解决方法

直接上解决方法
先说我最终解决用的方法

pip3 install tensorflow-hub -i http://pypi.douban.com/simple/ –trusted-host pypi.douban.com

指定镜像源,使用豆瓣的镜像源进行下载。
还有其他的镜像源可供使用,我第一次用的镜像源是清华的镜像,但是更换之后还是安装失败,可能是由于pip3和-hub的原因,你们可以试试pip3和pip3…-hub,我这里由于疏忽,最后是换成豆瓣的之后就安装成功了,供你们参考一下

清华的镜像源(也可能因为我用的pip而不是pip3以及-hub的原因)

豆瓣的镜像(成功)

其他方法

方法一 升级pip的版本

python -m pip install --upgrade pip -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com

方法二 更换新的镜像再进行下载
清华镜像源:

pip3 install numpy -i https://pypi.tuna.tsinghua.edu.cn/simple

中国科学技术大学

pip3 install numpy -i https://pypi.mirrors.ustc.edu.cn/simple

豆瓣

pip3 install numpy -i http://pypi.douban.com/simple/

阿里

pip3 install numpy -i http://mirrors.aliyun.com/simple/

更换完镜像之后再进行pip3 install tensorflow安装

原因分析

下载的版本和配置的环境兼容问题导致的,有时候版本问题雀食挺令人头疼的。

文章出处登录后可见!

已经登录?立即刷新

共计人评分,平均

到目前为止还没有投票!成为第一位评论此文章。

(0)
心中带点小风骚的头像心中带点小风骚普通用户
上一篇 2023年4月29日
下一篇 2023年4月29日

相关推荐