12

python pip 安装一些包找不到的问题 Could not find a version that satisfies....

 3 years ago
source link: https://blog.popkx.com/python-pip-error-and-solution/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

python pip 安装一些包找不到的问题 Could not find a version that satisfies....

发表于 2020-05-12 10:05:00   |   已被 访问: 235 次   |   分类于:   系统部署   |   暂无评论

有时我们使用下载python 自带的pip 安装一些工具包时,会报如下错误

错误与解决

错误与解决

找不到满意的版本,这时就是我们的pip可能需要升级了,所以使用

python -m pip install --upgrade pip

升级一下pip ,--upgrade 后面跟的是需要升级的库名

然后继续尝试发现还是不行,会报相同的错误,这时考虑到是网络的问题,我的网有时候是不稳定的,这时我们用国内的镜像源来加速

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

--trusted-host pypi.douban.com 这是为了获得ssl证书的认证

执行成功!

不过每次这样手动输入会比较麻烦,建议每次换系统时先换成国内的镜像源,具体配置请参考

https://blog.csdn.net/u012592062/article/details/51966649

————————————————
版权声明:本文为CSDN博主「金字塔的旅行」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/csdn_am/article/details/79924744

阅读更多:   系统部署


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK