pip: Pip 8.0.1 throws SSL: CERTIFICATE_VERIFY_FAILED

Upgrade to pip 8.0.1 on Python 2.7.5 and can no longer use pip install…

Example:

Collecting pip
  Using cached pip-8.0.1-py2.py3-none-any.whl
Installing collected packages: pip
  Found existing installation: pip 8.0.0
    Uninstalling pip-8.0.0:
      Successfully uninstalled pip-8.0.0
Successfully installed pip-8.0.1
Could not fetch URL https://pypi.python.org/simple/setuptools/: There was a problem confirming the ssl certificate: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:765) - skipping
Requirement already up-to-date: setuptools in ./env/lib/python2.7/site-packages
Collecting flasgger==0.5.10 (from -r scripts/requirements.txt (line 2))
  Could not fetch URL https://pypi.python.org/simple/flasgger/: There was a problem confirming the ssl certificate: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:765) - skipping
  Could not find a version that satisfies the requirement flasgger==0.5.10 (from -r scripts/requirements.txt (line 2)) (from versions: )
No matching distribution found for flasgger==0.5.10 (from -r scripts/requirements.txt (line 2))

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 30 (7 by maintainers)

Most upvoted comments

Hey!! I got it resolved… I used pip command as below and it worked for me.

pip install --trusted-host pypi.python.org django

Hope it helps. 😃

To add another solution. After a fresh install of Ubuntu 16.04 I was trying to install Django but geting an error:

 pip install -vvv django
<snip>
  File "/home/scott/.virtualenvs/testing/share/python-wheels/requests-2.9.1-py2.py3-none-any.whl/requests/adapters.py", line 447, in send
    raise SSLError(e, request=request)
requests.exceptions.SSLError: unknown error (_ssl.c:3053)
(testing) scott@dev:~$ pip --version
pip 8.1.1 from /home/scott/.virtualenvs/testing/lib/python3.5/site-packages (python 3.5)

My /etc/ssl/certs/ca-certificates.crt file was empty so I ran sudo update-ca-certificates which populated the ca-certificates.crt file and then everything started working.

Sorry to bring up an old issue but i’m noticing this in pip 9.0.1 on Centos 6 and 7 and python 3.6.1 Adding export REQUESTS_CA_BUNDLE="/etc/pki/tls/certs/ca-bundle.crt" solves it but seems sub-optimal.

Anyone else seen this?