首页 > 解决方案 > 确认 ssl 证书的问题:HTTPSConnectionPool(host='pypi.org', port=443):

问题描述

所以我将Pycharm 2019.2Python 2.7一起使用 ,我无法下载任何包。

我努力了:

所有人都拒绝连接这样的错误:

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'.

起诉 python 3.4 一切正常,但只有 2.7 我收到 SSL 错误。
由于工作场所的技术原因,我无法更改为 3.4。

标签: python-2.7

解决方案


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


推荐阅读