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
pipto at least 10.0.1 (alsosetuptoolsto 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 runningpip install --trusted-host pypi.org --trusted-host files.pythonhosted.org --upgrade pip setuptools.pipandsetuptools. Whichever one you use is fine; oncepipis updated, you shouldn't need to do anything ever again. But the line from my first comment should do it for you.easy_install; that advice is very out of date. You really do need to upgrade yourpip, either the way I showed above, or by just reinstalling it withget-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.)