admin管理员组

文章数量:1558048

公司一个老项目用的是python2.7版本,准备项目的时候 随手就再官网上下载了python2.7.5版本,发现里面没有pip工具
然后再再官网上下载了setuptools源码吧,执行里面的setup后,再通过 exsy_install 安装pip
查看如图
输入pip list 会看到下面的状况

然后用pip install XXX的时候
会出现下面的错误警告

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

SNIMissingWarning: An HTTPS request has been made, but the SNI (Server Name Indication) extension to TLS is not available on this pla
tform. 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

大费周章去查了查问题,查到了是urllib3包的问题,
文档说明如下:

崩溃之下,卸载了2.7.5版本
安装了2.7.15版本,里面都自带pip 真香。
当然,2.7.5版本的pip怎么解决,有大佬知道教教。

本文标签: pipSNIMissingWarningInsecurePlatformWarning