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)

Original: https://blog.csdn.net/qq_43490217/article/details/126639981
Author: 遗忘的迟来的风
Title: python使用pip安装包报错的解决办法(ERROR: Could not find a version that satisfies the requirement XXX)

原创文章受到原创版权保护。转载请注明出处:https://www.johngo689.com/732442/

转载文章受原作者版权保护。转载请注明原作者出处!

(0)

大家都在看

亲爱的 Coder【最近整理,可免费获取】👉 最新必读书单  | 👏 面试题下载  | 🌎 免费的AI知识星球