我正在尝试安装包request_ntlm。 如果我尝试使用以下命令,我仍会收到SSL错误:
pip install --trusted-host pypi.python.org --proxy http://username:password@site.address:port requests_ntlm
我尝试添加--index-url=http://pypi.python.org/simple/
,将可信和索引网址更改为http:/pypi.python.org,https:pypi.org,http://pypi.python.org/,http://pypi.python.org/pypi/但我最终结果相同。
包括-v
会返回以下内容:
pip install --trusted-host pypi.python.org --proxy http://username@password@site.address:port -v requests_ntlm
Config variable 'Py_DEBUG' is unset, Python ABI tag may be incorrect
Config variable 'WITH_PYMALLOC' is unset, Python ABI tag may be incorrect
Collecting requests_ntlm
1 location(s) to search for versions of requests-ntlm:
* https://pypi.python.org/simple/requests-ntlm/
Getting page https://pypi.python.org/simple/requests-ntlm/
Starting new HTTPS connection (1): pypi.python.org
https://pypi.python.org:443 "GET /simple/requests-ntlm/ HTTP/1.1" 301 122
Looking up "https://pypi.org/simple/requests-ntlm/" in the cache
No cache entry available
Starting new HTTPS connection (1): pypi.org
Incremented Retry for (url='/simple/requests-ntlm/'): Retry(total=4, connect=None, read=None, redirect=None, status=None)
Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:777)'),)': /simple/requests-ntlm/
Starting new HTTPS connection (2): pypi.org
Incremented Retry for (url='/simple/requests-ntlm/'): Retry(total=3, connect=None, read=None, redirect=None, status=None)
Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:777)'),)': /simple/requests-ntlm/
Starting new HTTPS connection (3): pypi.org
Incremented Retry for (url='/simple/requests-ntlm/'): Retry(total=2, connect=None, read=None, redirect=None, status=None)
Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:777)'),)': /simple/requests-ntlm/
Starting new HTTPS connection (4): pypi.org
Incremented Retry for (url='/simple/requests-ntlm/'): Retry(total=1, connect=None, read=None, redirect=None, status=None)
Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:777)'),)': /simple/requests-ntlm/
Starting new HTTPS connection (5): pypi.org
Incremented Retry for (url='/simple/requests-ntlm/'): Retry(total=0, connect=None, read=None, redirect=None, status=None)
Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:777)'),)': /simple/requests-ntlm/
Starting new HTTPS connection (6): pypi.org
Could not fetch URL https://pypi.python.org/simple/requests-ntlm/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/requests-ntlm/ (Caused by SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:777)'),)) - skipping
Could not find a version that satisfies the requirement requests_ntlm (from versions: )
Cleaning up...
No matching distribution found for requests_ntlm
此问题与this question类似,但不同之处在于我尝试了追加--trusted-host
的热门答案
任何人都有任何想法?