python使用pip安装包报错的解决办法(ERROR: Could not find a version that satisfies the requirement XXX)

使用pip命令安装python包时可能会出现如下错误提示:

ERROR: Could not find a version that satisfies the requirement XXX (from v
ersions: none)
ERROR: No matching distribution found for XXX
WARNING: There was an error checking the latest version of pip.

解决方法一:更换下载源

考虑指定下载源并信任其来源或许能下载成功,这里使用 豆瓣下载源,也可尝试其它下载源。

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

python使用pip安装包报错的解决办法(ERROR: Could not find a version that satisfies the requirement XXX)

解决方法二:使用源码安装

在官网PyPI · The Python Package Index搜索要下载的模块,找到Download Files,下载源码压缩包。

python使用pip安装包报错的解决办法(ERROR: Could not find a version that satisfies the requirement XXX)

python使用pip安装包报错的解决办法(ERROR: Could not find a version that satisfies the requirement XXX)

python使用pip安装包报错的解决办法(ERROR: Could not find a version that satisfies the requirement XXX)

python使用pip安装包报错的解决办法(ERROR: Could not find a version that satisfies the requirement XXX)

 将源码压缩包解压,Win+R打开运行窗口,输入cmd回车进入命令行,切换至源码包中setup.py所在目录,执行python setup.py install命令,即可安装成功。

python使用pip安装包报错的解决办法(ERROR: Could not find a version that satisfies the requirement XXX)

python使用pip安装包报错的解决办法(ERROR: Could not find a version that satisfies the requirement XXX)

 

文章出处登录后可见!

已经登录?立即刷新

共计人评分,平均

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

(0)
社会演员多的头像社会演员多普通用户
上一篇 2023年3月5日 下午8:11
下一篇 2023年3月5日 下午8:12

相关推荐