本文主要是介绍解决pip安装时出现SSLError的问题,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
错误代码:
C:\Python27\lib\site-packages\pip\_vendor\urllib3\util\ssl_.py:150: InsecurePlatformWarning: A true SSLContext object is not available.This prevents
urllib3 from configuring SSL appropriately and may cause certainSSL 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 InsecurePlatformWarning
Could not fetch URL https://pypi.org/simple/pygame/:
There was a problem
onfirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443):Max etries exceeded with url: /simple/pygame/ (Caused by SSLError(SSLError(1, _ssl.c:499: error:1407742E:SSL outines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version'),)) - skipping
出现这个问题的原因是安装源的证书不受信任,可更改pip的配置文件解决这个问题:
更改配置文件首先要知道配置文件在哪,通过阅读pip的源码:
以下是pip源码
if WINDOWS:bin_p
这篇关于解决pip安装时出现SSLError的问题的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!