6

I am kind of new to Python and I started learning about packages and I tried to install some packages and update pip but I always get this error:

WARNING: 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:1108)'))': /simple/pip/

WARNING: 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:1108)'))': /simple/pip/

WARNING: 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:1108)'))': /simple/pip/

WARNING: 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:1108)'))': /simple/pip/

WARNING: 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:1108)'))': /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:1108)')))

I tried to look online for a solution but anything I have tried by now has failed

Edit: solved it!

I have solved the problem and it was associated with my antivirus blocking pip. I have solved it by deleting my antivirus and everything works. Keep in mind that when I disable my antivirus and firewall, it didn't work and only worked when I deleted the antivirus completely.

I hope that if you have the same problem that will help you

2
  • What did you enter into the command line? Commented May 24, 2020 at 18:14
  • Is the data / time of your pc correct? Commented May 24, 2020 at 18:14

2 Answers 2

7

Please try updating your pip using the trusted option:

pip install --upgrade pip --trusted-host pypi.org --trusted-host files.pythonhosted.org

To make this setting permanent you can create a pip.ini file in your user folder that contains:

[global]
trusted-host = files.pythonhosted.org
               

Please note that this is a more generic solution, pointing to trust the fils.pythonhosted.org host.
It is important to investigate and understand the root cause of the issue (wrong time / date, for example, can be one of the possible ones).

Sign up to request clarification or add additional context in comments.

9 Comments

thank you , this is working but i am looking for a premenet solution. can i apply this to trust this source by default?
So even after the pip update you still have the issue? Can you please share your Python / Pip / Windows version? And, also important, are you into a corporate network?
so my pip version is 20.1.1 and i got python 3.8 and i got windows 10 pro v1903 (64 bit) , and i dont use tools like fidder
no i am not on any corporate network just my home network and i tried to add this folder before and it also dosent work , do you think that reinstall python worth a shot?
I am also facing the same problem. any solution
|
2

In my case it was a clock misconfigured.

I fixed that following this tutorial: Network - NTP

Check if your system clock is correct:

timedatectl status
Local time: Fr 2018-02-23 08:47:13 UTC
                   Universal time: Fr 2018-02-23 08:47:13 UTC
                         RTC time: Fr 2018-02-23 08:47:13
                        Time zone: Etc/UTC (UTC, +0000)
        System clock synchronized: yes
 systemd-timesyncd.service active: yes
                  RTC in local TZ: no

If not, install chrony:

sudo apt install chrony

And start chronyd - the actual daemon to sync and serve via the NTP protocol

sudo chronyd

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.