1

I'm trying to begin using Python 3.6 on a Windows 10 Enterprise but whenever I try to use pip to install necessary packages I always get a similar SSL error.

pip install requests gives the following error:

Collecting requests
  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:833)'),)': /simple/requests/
  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:833)'),)': /simple/requests/
  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:833)'),)': /simple/requests/
  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:833)'),)': /simple/requests/
  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:833)'),)': /simple/requests/
  Could not fetch URL https://pypi.python.org/simple/requests/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.python.org', port=443): Max retries exceeded with url: /simple/requests/ (Caused by SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:833)'),)) - skipping
  Could not find a version that satisfies the requirement requests (from versions: )
No matching distribution found for requests

I got this similar pattern of "Retrying" and failing error for all pip packages I try to install. I tried doing "easy_install bioservices" and I got:

...

Installed c:\users\...\python\python36-32\lib\site-packages\requests_cache-0.4.13-py3.6.egg
error: The 'requests' distribution was not found and is required by bioservices

And then trying to do pip install bioservices gives me:

Requirement already satisfied: bioservices in c:\users...\python\python36-32\lib\site-packages\bioservices-1.5.2-py3.6.egg Collecting grequests (from bioservices) 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:833)'),)': /simple/grequests/
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:833)'),)': /simple/grequests/ 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:833)'),)': /simple/grequests/
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:833)'),)': /simple/grequests/ 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:833)'),)': /simple/grequests/
Could not fetch URL https://pypi.python.org/simple/grequests/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.python.org', port=443): Max retries exceeded with url: /simple/grequests/ (Caused by SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:833)'),)) - skipping Could not find a version that satisfies the requirement grequests (from bioservices) (from versions: ) No matching distribution found for grequests (from bioservices)


I have no idea how to fix this. I'm using python 3.6.5 and pip 9.0.3. I've tried looking through many different stack overflow questions and other forums and have had no luck

12
  • You need to upgrade your pip to at least 10.0.1 (also setuptools to at least… I think 30.0.0, but I'm not sure). You can do this by reinstalling them from scratch, or, more simply, by running pip install --trusted-host pypi.org --trusted-host files.pythonhosted.org --upgrade pip setuptools. Commented Aug 6, 2018 at 20:18
  • I'm pretty sure there's a good dup explaining this, which I'll track down. Meanwhile, see this question for other ways of suppressing the SSL error while upgrading pip and setuptools. Whichever one you use is fine; once pip is updated, you shouldn't need to do anything ever again. But the line from my first comment should do it for you. Commented Aug 6, 2018 at 20:20
  • I couldn't find a duplicate that was up-to-date, but nearly as good as that one, so I updated the answer on that one… Commented Aug 6, 2018 at 20:26
  • @abarnert Running your first comment still gives me the same pattern of retry errors and sslerror as all pip commands have been :( I also saw that article as well and tried the easy_install method (described in my post) Commented Aug 6, 2018 at 20:27
  • Don't try easy_install; that advice is very out of date. You really do need to upgrade your pip, either the way I showed above, or by just reinstalling it with get-pip.py (also shown in the same linked answer). After you do that, if you still have the same errors, you can edit your question to be about pip 18 and setuptools 40 instead of the old versions, and we can debug it from there. (Whether that means finding a dup that fixes your problem, or writing a new answer.) Commented Aug 6, 2018 at 20:30

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.