解决 ERROR: Could not find a version that satisfies the requirement xxx 的问题
1.解决 ERROR: Could not find a version that satisfies the requirement xxx 的问题
我们经常通过pip安装东西时常常会出现ERROR: Could not find a version that satisfies the requirement xxx的问题。该问题常常会误导我们认为是下载的安装包之间存在冲突,因而花费大量的时间去配置各种各样的环境。
- 其实出现这个问题的原因是python国内网络不稳定,直接导致报错。因此我们常用镜像源来解决此问题。如下
pip install 包名 -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com

当遇到pip安装Python包时出现`ERROR: Could not find a version that satisfies the requirement xxx`的问题,通常这不是因为包冲突,而是由于国内网络环境不稳定导致的。解决方法是使用国内镜像源,如豆瓣(douban)的镜像,通过`pip install 包名 -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com`命令进行安装,这能有效避免因网络问题引起的安装失败。
11万+

被折叠的 条评论
为什么被折叠?



