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
  Install error middlestudent 1 714 Sep-23-2023, 08:26 AM
Last Post: middlestudent
  Error 1064 (42000) when executing UPDATE SQL gratiszzzz 7 1,366 May-22-2023, 02:38 PM
Last Post: buran
  wxPython install error carlomscalisi 3 3,546 Jan-17-2023, 11:04 AM
Last Post: snippsat
  Error with pip install coffeeguy 1 2,208 Sep-08-2022, 01:27 AM
Last Post: snippsat
  kmeans install error (please help me) muratuzun 3 5,333 May-06-2022, 02:14 PM
Last Post: snippsat
  Install any library via pip get an error cannot import name 'SCHEME_KEYS' from 'pip. Anldra12 2 10,488 Jan-04-2022, 01:05 PM
Last Post: Anldra12
  Anaconda pip install mpyc Error pip-script.py is not present Anldra12 2 7,719 Dec-13-2021, 06:59 PM
Last Post: Anldra12
  SSL error while trying to update conda ilango 0 2,121 Nov-04-2021, 08:38 AM
Last Post: ilango
  Minecraft Python install error SomeAcandKid 1 2,310 Oct-06-2021, 06:22 PM
Last Post: Ronhamas
  Installed pip install openpyxl, Requirement already satisfied, but, still have error jonah88888 3 6,515 Sep-24-2021, 02:11 AM
Last Post: jonah88888

Forum Jump:

User Panel Messages

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