LinMinquan's Blog

Experience technology to change life

python SNIMissingWarning InsecurePlatformWarning

环境:CentOS 6.8, Python 2.6.6

敲一些命令时,比如 pip list时,会提示:

/usr/lib/python2.6/site-packages/pip/_vendor/requests/packages/urllib3/util/
ssl_.py:318: SNIMissingWarning: An HTTPS request has been made, but the 
SNI (Subject Name Indication) 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/security.html#snimissingwarning.
  SNIMissingWarning
/usr/lib/python2.6/site-packages/pip/_vendor/requests/packages/urllib3/util/
ssl_.py:122: 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/
security.html#insecureplatformwarning.
  InsecurePlatformWarning

解决办法是安装

pip install pyopenssl ndg-httpsclient pyasn1

 


Share