python - 无法使用 pip 21.0.1 SSLEOFError 安装任何软件包
问题描述
我在 Ubuntu1604 上使用带有 pip 21.0.1 的 python 3.7。我无法安装任何带有错误的python包
yc_qian@NiBaBa:~$ pip install pyopenssl
Defaulting to user installation because normal site-packages is not writeable
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1076)'))': /simple/pyopenssl/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1076)'))': /simple/pyopenssl/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1076)'))': /simple/pyopenssl/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1076)'))': /simple/pyopenssl/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1076)'))': /simple/pyopenssl/
Could not fetch URL https://pypi.tuna.tsinghua.edu.cn/simple/pyopenssl/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.tuna.tsinghua.edu.cn', port=443): Max retries exceeded with url: /simple/pyopenssl/ (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1076)'))) - skipping
ERROR: Could not find a version that satisfies the requirement pyopenssl
ERROR: No matching distribution found for pyopenssl
Could not fetch URL https://pypi.tuna.tsinghua.edu.cn/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.tuna.tsinghua.edu.cn', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1076)'))) - skipping
我在github上发现了类似的问题,但不知道如何解决。我也尝试降级pip,但是命令也使用pip,所以遇到了同样的错误......
我该如何解决这个问题?
解决方案
根据菲利克斯在这里提到的答案,我解决了这个问题
unset http_proxy https_proxy
推荐阅读
- c# - 如何在 PHP 中从 SOAP WebService 的 WSDL 创建对象?
- time - 在 R Shiny 中从特定工作日的密度中选择时间间隔
- ruby-on-rails - 如何在 Rails 中拆分解析器
- sequelize.js - 在包含中指定字段
- python - 如何使 OpenGL 镜面光工作?
- javascript - 在功能模块的组件中使用应用模块的组件
- python - 无法使用 uwsgi-nginx-flask-docker 部署烧瓶:图像 404(未找到)
- kubernetes - 在路径 `/registry` 公开 Kubernetes 集群内的私有 Docker 注册表
- javascript - ExtJs 工具栏不会根据宽度自动包装
- node.js - 通过 Web 服务或直接 SSAS 到 BI 工具?