【发布时间】:2022-01-17 09:53:17
【问题描述】:
我正在使用:
- Python 3.10.1
- 点 21.2.4
- 虚拟环境中的 Python 项目
我的问题: 每次我尝试安装任何软件包(例如 opencv)时,都会出现以下错误:
(einstieg) C:\Users\User\Python\pyproj>pip install python-ldap
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:997)'))': /simple/python-ldap/
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:997)'))': /simple/python-ldap/
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:997)'))': /simple/python-ldap/
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:997)'))': /simple/python-ldap/
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:997)'))': /simple/python-ldap/
Could not fetch URL https://pypi.org/simple/python-ldap/:
There was a problem confirming the ssl certificate:
HTTPSConnectionPool(host='pypi.org', port=443):
Max retries exceeded with url: /simple/python-ldap/
(Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:997)'))) - skipping
ERROR: Could not find a version that satisfies the requirement python-ldap (from versions: none)
ERROR: No matching distribution found for python-ldap
Could not fetch URL https://pypi.org/simple/pip/:
There was a problem confirming the ssl certificate:
HTTPSConnectionPool(host='pypi.org', port=443):
Max retries exceeded with url: /simple/pip/
(Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:997)'))) - skipping
我尝试了一些我发现的受信任主机提示,但没有任何效果。 有人知道我的问题出在哪里吗?
【问题讨论】:
-
您是否在需要代理的网络上和/或您是否配置了代理?
-
是的代理,我需要下载包...
-
pip 有代理配置,我相信;正确设置应该会有所帮助,您只需执行一次(而不是总是手动下载包)