解决ERROR: Could not find a version that satisfies the requirement 问题及 ERROR: Exception:Traceback

最近安装tensorflow-hub 出现错误:

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

先说本人最终解决使用的方法:更换下载镜像源并将pip 改为 pip3

出现这个问题有可能是你下载的版本与你配置的环境不兼容,最好是寻找对应的版本进行pip,此方法确实可以下载下来,但下载后不一定可用。

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

install 后面是你需要下载的包,用的是豆瓣的镜像源

如果问题还是没有解决可以尝试以下方法

1、升级 pip

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

2、更换其他镜像源

清华镜像源:   https://pypi.tuna.tsinghua.edu.cn/simple

中国科学技术大学 : https://pypi.mirrors.ustc.edu.cn/simple

豆瓣:http://pypi.douban.com/simple/

阿里: http://mirrors.aliyun.com/simple/

使用方法

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

 至于pip与pip3的区别可以自行去搜一下。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
THE END
分享
二维码
< <上一篇
下一篇>>