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

posted @ 2022-05-31 09:57  道霖  阅读(719)  评论(0编辑  收藏  举报