PIP 安装包 报错 SSL

报错如下:

D:\acadci-github\wk_client_tools\venv\lib\site-packages\pip\_vendor\urllib3\util\ssl_.py:137: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings

网上说是pypi官网不再支持低版本的ssl协议, 而python2.7.9之前的pip所有的客户端协议比较旧,所有一直报SSl协议问题, 

可以通过升级pip包解决问题, 但是这个就是egg-hen的问题了.

试了 --trusted-host参数不行,
 

pip --trusted-host pypi.org install virtualenv

试了用国内的http网站, 不知道是防火墙问题还是什么 也不行. 

最后一气之下更新了python 版本到2.7.14 解决了这个问题.   

这边文章解释了一些更深层的原因, 为什么ssl协议版本低

http://blog.51cto.com/13544424/2149473?cid=722522(中文的)

这儿还有一个英文的版本, 不过他的解决方案适用于mac,可以帮助我们理解这个问题

https://stackoverflow.com/questions/49748063/pip-install-fails-for-every-package-could-not-find-a-version-that-satisfies/49748494#49748494

扫描二维码关注公众号,回复: 4864771 查看本文章

这个官方文档也挺有用的:

https://pip.pypa.io/en/stable/installing/#upgrading-pip

猜你喜欢

转载自blog.csdn.net/weixin_42215229/article/details/86152278
今日推荐