错误代码:
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 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 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