2
votes

Since roughly a week or two ago, I've not been able to use pip at all, as it always kicks back the following error:

ERROR: Could not install packages due to an EnvironmentError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Max retries exceeded with url: /packages/1b/e5/552ba65835ab43e12b299458fea94ee23886125b8b8aabc91edb03f2ba65/pandas-1.1.3.tar.gz (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1122)')))

I've tested it on and off my company VPN, and even tried on my personal laptop (running Mojave, as opposed to Windows 10 on my main laptop). Both my home internet as well as a hot spot on my phone. As well, I've remoted in to one of my companie's Australian machines and was having the same problem.

I've not updated my python version (3.9.0) or pip version (20.2.3), or changed my pip usage, so just a super perplexing issue to arise suddenly. https://status.python.org/ says that everything is up too.

Is there something I am doing wrong?

Full CMD text if its helpful:

C:\Users\Caleb.Clough\Digital>pip install pandas

Collecting pandas

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:1122)'))': /packages/1b/e5/552ba65835ab43e12b299458fea94ee23886125b8b8aabc91edb03f2ba65/pandas-1.1.3.tar.gz 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:1122)'))': /packages/1b/e5/552ba65835ab43e12b299458fea94ee23886125b8b8aabc91edb03f2ba65/pandas-1.1.3.tar.gz

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:1122)'))': /packages/1b/e5/552ba65835ab43e12b299458fea94ee23886125b8b8aabc91edb03f2ba65/pandas-1.1.3.tar.gz

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:1122)'))': /packages/1b/e5/552ba65835ab43e12b299458fea94ee23886125b8b8aabc91edb03f2ba65/pandas-1.1.3.tar.gz

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:1122)'))': /packages/1b/e5/552ba65835ab43e12b299458fea94ee23886125b8b8aabc91edb03f2ba65/pandas-1.1.3.tar.gz

ERROR: Could not install packages due to an EnvironmentError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Max retries exceeded with url: /packages/1b/e5/552ba65835ab43e12b299458fea94ee23886125b8b8aabc91edb03f2ba65/pandas-1.1.3.tar.gz (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1122)')))

3

3 Answers

2
votes

Can you try the following:

$ pip install --trusted-host pypi.org --trusted-host files.pythonhosted.org <package_name>

in your case

$ pip install --trusted-host pypi.org --trusted-host files.pythonhosted.org pandas
2
votes

Pandas is a PyPI repo. It means that it stores in the PyPI servers. If you can't pip install it, it means that your pip doesn't trust PyPI as a "Python package authority".

What can you do:

To solve the issue, I would have added PyPI to the list of trusted hosts, from which you can pip install stuff.

  1. Make sure you have pip.conf file:

    in windows: %HOME%\pip\pip.ini

    in Linux: $HOME/.pip/pip.conf

  2. Make the file looks like this:

    [global]
    trusted-host = pypi.python.org

Then run:

pip install pandas
0
votes

If you have installed the latest version of Cisco Any Connect try to uninstall Cisco Umbrella module.