1

I am trying to install the package requests_ntlm. If I try to use the following command, I still receive an SSL Error:

 pip install --trusted-host pypi.python.org --proxy http://username:password@site.address:port requests_ntlm

I have tried adding --index-url=http://pypi.python.org/simple/, changing the trusted and index URL to http:/pypi.python.org, https:pypi.org, http://pypi.python.org/, http://pypi.python.org/pypi/ but I end up with the same result.

including -v returns the following:

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 is similar to this question but with the difference in that I have tried the popular answer of appending --trusted-host

Anyone have any ideas why?

penfold1992
  • 305
  • 2
  • 14
  • What version of pip are you on? Could be related to using an older version of TLS. See [this](https://stackoverflow.com/q/49768770/1526703) – Anupam Apr 25 '18 at 14:27
  • I am using 9.0.1, I am unable to try to update pip using the command ````curl https://bootstrap.pypa.io/get-pip.py | python````. I did download get-pip.py but I cannot install because it again fails with the same issue "SSL: CERTIFICATE_VERIFY_FAILED" – penfold1992 Apr 25 '18 at 15:01
  • 1
    Possible duplicate of [Not able to install python packages \[SSL: TLSV1\_ALERT\_PROTOCOL\_VERSION\]](https://stackoverflow.com/questions/49768770/not-able-to-install-python-packages-ssl-tlsv1-alert-protocol-version) – phd Apr 25 '18 at 15:45

0 Answers0