5
votes

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?Brenden Price
Is the data / time of your pc correct?Pitto

2 Answers

2
votes

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
               
0
votes

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