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安装

原因分析

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

  • 55
    点赞
  • 93
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 29
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 29
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

阿松爱睡觉

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值