Python安装包报错ERROR: Could not find a version that satisfies the requirement XXX解决方法

我们在使用 pip 安装 python 包时,经常会出现如下错误:

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


找了很久终于找到能解决这种报错的方法了。

直接选用pip源并且信任它的来源就可以解决这种问题。

pip install 库包名 -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com

上面使用了豆瓣源,将其换成清华源、阿里源等都适用。

清华源:

Simple Index

文章出处登录后可见!

已经登录?立即刷新

共计人评分,平均

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

(0)
社会演员多的头像社会演员多普通用户
上一篇 2023年7月15日
下一篇 2023年7月15日

相关推荐