python 2.7安装各种包错误

我是因为要使用Arcpy所以python版本需要和ArcGIS版本对应,导致Python版本不能更新,在安装一些包的时候出现各种问题

比如说

D:\Python27\ArcGIS10.2\lib\site-packages\pip-9.0.1-py2.7.egg\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
D:\Python27\ArcGIS10.2\lib\site-packages\pip-9.0.1-py2.7.egg\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
  Could not fetch URL https://pypi.python.org/simple/pyopenssl/: There was a problem confirming the ssl certificate: [Errno 1] _ssl.c:504: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version - skipping
  Could not find a version that satisfies the requirement pyopenssl (from versions: )
No matching distribution found for pyopenssl
D:\Python27\ArcGIS10.2\lib\site-packages\pip-9.0.1-py2.7.egg\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

我也参考了网上说的各种解决方法,不知道为什么在我这里还是无法解决。比如说

在cmd中输入:  pip install pyopenssl ndg-httpsclient pyasn1

最后的解决方法就是直接去这里

https://pypi.org/

下载source包,然后解压->cd到该目录->python setup.py install

解决

 

转载自:https://blog.csdn.net/xiaoweiba_h/article/details/80168910

You may also like...