python 2.X版本-pip安装失败Could not find a version that satisfies the requirement xxxx(from versions: )
事件:今天在安装python的OpenSSL库时,发现安装会报一个错误:
Could not find a version that satisfies the pyOpenSSL (from versions: )
No matching distribution found for pyOpenSSL
在网上查找资料发现,这是网络问题,国外网站不是很稳定,需要使用国内的镜像源来加速,比如豆瓣源
pip install pyopenssl -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com
其中–trusted-host pypi.douban.com 的作用是获得ssl证书的认证