运行Python相关命令出现如下报错
1 2 3 4 |
/usr/lib/python2.6/site-packages/urllib3/util/ssl_.py:335: 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 /usr/lib/python2.6/site-packages/urllib3/util/ssl_.py:133: 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 |
解决方法为:
1 |
pip install pyopenssl ndg-httpsclient pyasn1 |
如若出现如下报错:
1 |
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-nIroZA/cryptography/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-y3BvBN-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-nIroZA/cryptography/ |
请先执行如下命令再执行上述操作
1 |
pip install -U pip setuptools |