SSL certificate issues preventing pip package installs on windows

-1

I installed Python 3.8 from the python.org downloads site onto my 64-bit Windows machine today. Shortly thereafter, I attempted to install the pyodbc package using pip from a command console opened as an administrator:

pip install pyodbc

The following error broke my connection on several attempts:

'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1108)')': /simple/pyodbc/

(I don't believe these issues are specific to the pyodbc package, but that just happens to be the package I've been trying to install). After some googling I tried

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

after which I received the error

ERROR: Could not find a version that satisfies the requirement pyodbc (from versions: none)

ERROR: No matching distribution found for pyodbc

Based on this SO answer, I decided to execute

curl https://bootstrap.pypa.io/get-pip.py | python

after which I received the error

next InitializeSecurityContext failed: SEC_E_UNTRUSTED_ROOT (0x80090325) - The certificate chain was issued by an authority that is not trusted.

I'm not sure where to go from here. Python 3.8 is a fresh install, as is pip (which shows as version 19.2.3). Nevertheless there seems to be a problem confirming SSL certificates. How can I get pip installs working?

python
pip
ssl-certificate
asked on Stack Overflow Dec 12, 2019 by Rookatu

1 Answer

0

You have two separate issues:

  1. You are behind a proxy/firewall or using an endpoint antivirus that messes with your CA cert store. Your --trusted-host is a workaround for that

  2. pyodbc doesn't support Python 3.8 yet.

answered on Stack Overflow Dec 12, 2019 by Selcuk

User contributions licensed under CC BY-SA 3.0