Python Forum
Cannot update or install anything with pip, SSL error
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Cannot update or install anything with pip, SSL error
#1
Hi everyone, this is my first time posting on here and I really need help with this problem. I've had Python and pip on my PC since I got it about a year ago and never really used pip that much until recently. I'm working on a project with my friend in PyCharm and I need to install some requirements for this project but every time I try to install them or do anything with pip I get this message:

Microsoft Windows [Version 10.0.17134.254]
© 2018 Microsoft Corporation. All rights reserved.

C:\Users\Nick>python -m pip install --upgrade pip
Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1045)'))': /simple/pip/
Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1045)'))': /simple/pip/
Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1045)'))': /simple/pip/
Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1045)'))': /simple/pip/
Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1045)'))': /simple/pip/
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(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1045)'))) - skipping
Requirement already up-to-date: pip in c:\program files\python37\lib\site-packages (10.0.1)
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(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1045)'))) - skipping

It doesn't matter what I try to do with pip, the SSL error comes up every time. I can't even update or upgrade it. Yesterday I uninstalled my older versions of Python and downloaded 3.7 and 3.6.6 and downloaded pip with them, it did nothing. I have tried every solution I could find and nothing works. I don't know what happened or why pip isn't working correctly. If you have something I can try I would greatly appreciate it!
Reply
#2
Try:
python -m pip install --trusted-host pypi.python.org --trusted-host files.pythonhosted.org --trusted-host pypi.org --upgrade pip
Bug report.
Quote:It appears the issue is a corporate proxy/firewall/mitm-box is not allowing traffic to pypi.org and/or files.pythonhosted.org.

Not related but our install tutorial.
Python 3.6/3.7 and pip installation under Windows
Reply
#3
Thanks for the response. I tried that and this is what it said:

Microsoft Windows [Version 10.0.17134.254]
© 2018 Microsoft Corporation. All rights reserved.

C:\Users\Nick>python -m pip install --trusted-host pypi.python.org --trusted-host files.pythonhosted.org --trusted-host pypi.org --upgrade pip
Collecting pip
Downloading https://files.pythonhosted.org/packages/...ne-any.whl (1.3MB)
100% |████████████████████████████████| 1.3MB 4.7MB/s
Installing collected packages: pip
Found existing installation: pip 10.0.1
Uninstalling pip-10.0.1:
Could not install packages due to an EnvironmentError: [WinError 5] Access is denied: 'c:\\program files\\python37\\lib\\site-packages\\pip-10.0.1.dist-info\\entry_points.txt'
Consider using the --user option or check the permissions.

You are using pip version 10.0.1, however version 18.0 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
Reply
#4
Run cmd as Administrator.
Reply
#5
Running cmd as admin did upgrade pip to version 18.0 but I still get the same ssl error when I try to install anything with pip, admin or not.
Reply
#6
(Sep-05-2018, 12:56 AM)nickystixx45 Wrote: Running cmd as admin did upgrade pip to version 18.0 but I still get the same ssl error when I try to install anything with pip, admin or not.

Did you ever resolve?
Reply
#7
(Mar-25-2019, 07:57 PM)ThatGuyDuncan Wrote:
(Sep-05-2018, 12:56 AM)nickystixx45 Wrote: Running cmd as admin did upgrade pip to version 18.0 but I still get the same ssl error when I try to install anything with pip, admin or not.

Did you ever resolve?

Yes. Whenever I need to install or update something I have to put: pip install --trusted-host=pypi.org --trusted-host=files.pythonhosted.org --user {name of whatever I'm installing}

I found this solution here: https://github.com/pypa/pip/issues/5363
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Eliminating error in Python update-alternatives Led_Zeppelin 2 453 Apr-14-2021, 12:49 PM
Last Post: Led_Zeppelin
  error trying to install sslstrip NullAdmin 1 612 Mar-11-2021, 09:37 PM
Last Post: buran
  python setup.py install error blackclover 2 925 Jan-07-2021, 04:36 AM
Last Post: blackclover
Question Python + Google Sheet | Best way to update specific cells in a single Update()? Vokofe 1 435 Dec-16-2020, 05:26 AM
Last Post: Vokofe
  trying to pip install stasm module getting error djf123 3 1,430 Jul-26-2020, 05:00 AM
Last Post: millpond
  pip install -e ., ERROR: Failed building wheel for pyfarmhash mostafaPython 1 1,871 Jun-09-2020, 08:24 PM
Last Post: mcmxl22
  "pip install -e ." returns : ERROR: Command errored out with exit status 1 mostafaPython 3 1,940 Jun-09-2020, 09:28 AM
Last Post: snippsat
  pip install musicplayer error Kumarkv 4 1,709 May-20-2020, 08:31 PM
Last Post: Larz60+
  REGEX Install Error in PyCharm charlesauspicks 1 962 May-14-2020, 08:10 PM
Last Post: buran
  Error message when trying to install Matplotlib in Python3.8 Transitionyte 5 2,345 Jan-22-2020, 11:52 PM
Last Post: Transitionyte

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020