用pip安装pymongo模块报错:Could not find a version that satisfies the requirement pymongo(from version:)

时间:2021-01-05 17:07:08

cmd中想用pip安装pymongo模块

显示黄色错误信息ReadTimeoutError和ConnectTimeoutError

Retrying几次之后显示红色错误信息Could not find a version that satisfies the requirement pymongo(from version:)   No matching distribution found for pymongo

报错信息如下图所示:

用pip安装pymongo模块报错:Could not find a version that satisfies the requirement pymongo(from version:)

用pip安装pymongo模块报错:Could not find a version that satisfies the requirement pymongo(from version:)

看有些网友说是因为网络的问题,要使用国内的镜像源来加速:pip install pymongo -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com

又出现报错了:

用pip安装pymongo模块报错:Could not find a version that satisfies the requirement pymongo(from version:)

用pip安装pymongo模块报错:Could not find a version that satisfies the requirement pymongo(from version:)

不过这次报错信息比较友好,提示pip版本太低需要升级,就按照它提示的命令输入,但是update的过程失败了好几次,多执行几次就好了,我是第4次才成功:

用pip安装pymongo模块报错:Could not find a version that satisfies the requirement pymongo(from version:)

用pip安装pymongo模块报错:Could not find a version that satisfies the requirement pymongo(from version:)

至此成功更新pip!

接下来输入你一开始要执行的命令pip install pymongo,就可以成功安装啦!

用pip安装pymongo模块报错:Could not find a version that satisfies the requirement pymongo(from version:)

用pip安装pymongo模块报错:Could not find a version that satisfies the requirement pymongo(from version:)