Python 2.7 p确认ssl证书时出现问题:HTTPSConnectionPool(主机=';pypi.org';,端口=443):

Python 2.7 p确认ssl证书时出现问题:HTTPSConnectionPool(主机=';pypi.org';,端口=443):,python-2.7,Python 2.7,因此,我将Pycharm 2019.2与Python2.7一起使用 我不能下载任何软件包 我试过: 将包硬拷贝到Python2.7目录 pip安装urllib3[安全] pip安装--trusted host=pypi.python.org--trusted host=pypi.org --可信主机=files.pythonhosted.org xlrd 所有人都拒绝连接,错误如下: Retrying (Retry(total=4, connect=None, read=None, redi

因此,我将Pycharm 2019.2与Python2.7一起使用 我不能下载任何软件包

我试过:

  • 将包硬拷贝到Python2.7目录
  • pip安装urllib3[安全]
  • pip安装--trusted host=pypi.python.org--trusted host=pypi.org --可信主机=files.pythonhosted.org xlrd
所有人都拒绝连接,错误如下:

Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, '_ssl.c:499: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version'),)': /simple/xlrd/
C:\Python27\lib\site-packages\pip-19.0.3-py2.7.egg\pip\_vendor\urllib3\util\ssl_.py:150: 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
在Pycharm中,我在尝试安装软件包时遇到以下错误:

Could not fetch URL https://pypi.org/simple/geopy/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/geopy/ (Caused by SSLError(SSLError(1, '_ssl.c:499: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version'),)) - skipping

Proposed Solution:
Try to run this command from the system terminal. Make sure that you use the correct version of 'pip' installed for your Python interpreter located at 'C:\Python27\python.exe'.
使用Python3.4时,一切都运行得非常好,但只有在使用2.7时,我才发现SSL错误。

由于工作场所的技术原因,我无法更改为3.4版本。

这是一个翻译问题。该代码最初是使用python 3.7编写的