1. 程式人生 > 其它 >python2使用pip安裝包時報ssl錯誤

python2使用pip安裝包時報ssl錯誤

DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support
for Python 2.7 in January 2021. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support

d:\worksoftware\python275\lib\site-packages\pip\_vendor\urllib3\util\ssl_.py:380: SNIMissingWarning: An HTTPS request has been made, but the SNI (Server Name Indicatio
n) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. 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
  SNIMissingWarning,

安裝時,指定國內映象,同時信任該映象點

C:\Python2\Scripts\pip.exe install tornado \

-i https://pypi.tuna.tsinghua.edu.cn/simple \

--trusted-host pypi.tuna.tsinghua.edu.cn