pip 报错 ssl_.py:339: SNIMissingWarning: An HTTPS request has been made, but the SNI

node2:/root#pip install django-celery-results -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com
Requirement already satisfied: django-celery-results in /usr/local/python27/lib/python2.7/site-packages/django_celery_results-1.0.4-py2.7.egg
Requirement already satisfied: celery==4.2.0 in /usr/local/python27/lib/python2.7/site-packages (from django-celery-results)
Requirement already satisfied: pytz>dev in /usr/local/python27/lib/python2.7/site-packages (from celery==4.2.0->django-celery-results)
Requirement already satisfied: billiard<3.6.0,>=3.5.0.2 in /usr/local/python27/lib/python2.7/site-packages (from celery==4.2.0->django-celery-results)
Requirement already satisfied: kombu<5.0,>=4.2.0 in /usr/local/python27/lib/python2.7/site-packages (from celery==4.2.0->django-celery-results)
Requirement already satisfied: amqp<3.0,>=2.1.4 in /usr/local/python27/lib/python2.7/site-packages (from kombu<5.0,>=4.2.0->celery==4.2.0->django-celery-results)
Requirement already satisfied: vine>=1.1.3 in /usr/local/python27/lib/python2.7/site-packages (from amqp<3.0,>=2.1.4->kombu<5.0,>=4.2.0->celery==4.2.0->django-celery-results)
/root/.local/lib/python2.7/site-packages/pip/_vendor/urllib3/util/ssl_.py:339: 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/advanced-usage.html#ssl-warnings
  SNIMissingWarning
/root/.local/lib/python2.7/site-packages/pip/_vendor/urllib3/util/ssl_.py:137: 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


解决:

sudo pip install -U pyopenssl ndg-httpsclient pyasn1 
Or 
sudo pip install --upgrade pip 

node2:/root#pip install django-celery-results -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com
/usr/local/python27/lib/python2.7/site-packages/cryptography/hazmat/primitives/constant_time.py:26: CryptographyDeprecationWarning: Support for your Python version is deprecated. The next version of cryptography will remove support. Please upgrade to a 2.7.x release that supports hmac.compare_digest as soon as possible.
  utils.DeprecatedIn23,
Looking in indexes: http://mirrors.aliyun.com/pypi/simple/
Requirement already satisfied: django-celery-results in /usr/local/python27/lib/python2.7/site-packages/django_celery_results-1.0.4-py2.7.egg (1.0.4)
Requirement already satisfied: celery==4.2.0 in /usr/local/python27/lib/python2.7/site-packages (from django-celery-results) (4.2.0)
Requirement already satisfied: pytz>dev in /usr/local/python27/lib/python2.7/site-packages (from celery==4.2.0->django-celery-results) (2017.2)
Requirement already satisfied: billiard<3.6.0,>=3.5.0.2 in /usr/local/python27/lib/python2.7/site-packages (from celery==4.2.0->django-celery-results) (3.5.0.3)
Requirement already satisfied: kombu<5.0,>=4.2.0 in /usr/local/python27/lib/python2.7/site-packages (from celery==4.2.0->django-celery-results) (4.2.1)
Requirement already satisfied: amqp<3.0,>=2.1.4 in /usr/local/python27/lib/python2.7/site-packages (from kombu<5.0,>=4.2.0->celery==4.2.0->django-celery-results) (2.3.2)
Requirement already satisfied: vine>=1.1.3 in /usr/local/python27/lib/python2.7/site-packages (from amqp<3.0,>=2.1.4->kombu<5.0,>=4.2.0->celery==4.2.0->django-celery-results) (1.1.4)
node2:/root#

 

转载自:https://blog.csdn.net/zhaoyangjian724/article/details/83008887

You may also like...