Python之使用pip安装三方库Error:Could not find a version that satisfies the requirement (from versions: none),No matching distribution found for

时间:2021-04-20 16:40:52

  出现多次使用pip安装包时提示以下报错:

ERROR: Could not find a version that satisfies the requirement <package> (from versions: none)
ERROR: No matching distribution found for <package>

Python之使用pip安装三方库Error:Could not find a version that satisfies the requirement <package>(from versions: none),No matching distribution found for <package>

 看提示信息说是木有匹配的包版本,那既然这样就制定安装的Python的三方包的版本,但是也不行,那说明可能不是包版本问题。

Python之使用pip安装三方库Error:Could not find a version that satisfies the requirement <package>(from versions: none),No matching distribution found for <package>

网上查了下说有可能是网络问题,于是替换使用国内的镜像源来加速:

  pip install  <package> -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com

  --trusted-host pypi.douban.com的作用是获得ssl的认证

执行命令后,python包安装成功

Python之使用pip安装三方库Error:Could not find a version that satisfies the requirement <package>(from versions: none),No matching distribution found for <package>