python-2.7 - 确认 ssl 证书的问题:HTTPSConnectionPool(host='pypi.org', port=443):
问题描述
所以我将Pycharm 2019.2与Python 2.7一起使用 ,我无法下载任何包。
我努力了:
- 将包硬拷贝到 Python2.7 目录
- 点安装 urllib3 [安全]
- pip install --trusted-host=pypi.python.org --trusted-host=pypi.org --trusted-host=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'.
起诉 python 3.4 一切正常,但只有 2.7 我收到 SSL 错误。
由于工作场所的技术原因,我无法更改为 3.4。
解决方案
这是一个口译员问题。该代码最初是使用 python 3.7 编写的
推荐阅读
- html - Safari 浏览器 - 选择下拉菜单不显示默认选项,仅来自 ngFor 的第一个选项
- spring-data-r2dbc - r2dbc 连接端口添加了两次(无法连接到 db_app:5432:5432)而 jdbc 很好?
- reactjs - 在反应中的对象数组中追加文件| 当我使用 JSON.stringfy() 我丢失了文件
- qt - QtMqtt 模块“PCH 文件错误”。在 Centos 上安装 QtMqtt 模块时出现问题
- java - Java流修改字符串
- php - 上传 XLS 文件:1089 错误恶意文件已通过(Laravel)
- android - Android Stuio 不显示或下载 sdk 仅在更改语言后
- react-native - 边界半径溢出在 react-native 中无法正常工作
- javascript - javascript - Promise.resolve.then 不连续运行
- python - Python:如何将 JSON 对象附加到 JSON 数组