SSL: CERTIFICATE_VERIFY_FAILED for pip in Windows 10

0

1

How can I resolve this silly SSL certificate error for pip? It is unable to download packages due to messing up the certificate chain to pip's own repository:

>pip3 install bashate
...
distutils.errors.DistutilsError: Download error for https://files.pythonhosted.org/packages/f3/04/fddc1c2dd75b256eda4d360024
692231a2c19a0c61ad7f4a162407c1ab58/pbr-5.1.1-py2.py3-none-any.whl#sha256=f6d5b23f226a2ba58e14e49aa3b1bfaf814d0199144b95d78458212
444de1387: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1056)

I tried updating pip to the latest version with python -m pip install -U pip, did not make a difference.

I also tried configuring my %APPDATA%.ini:

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

No difference in behavior. Also explicitly supplied command line flag --trusted-host files.pythonhosted.org, no luck.

This is strange, as I am only seeing this error in Windows (10), as opposed to Linux, BSD, and macOS, where pip3 is working fine.

Update

Update: The problem is specific to the bashate pip package. Other pip packages install just fine.

mcandre

Posted 2019-01-14T04:41:11.250

Reputation: 2 696

No answers