Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pip install on macOS venv returns SSL CERTIFICATE_VERIFY_FAILED #964

Closed
jdandrea opened this issue Oct 11, 2016 · 3 comments
Closed

pip install on macOS venv returns SSL CERTIFICATE_VERIFY_FAILED #964

jdandrea opened this issue Oct 11, 2016 · 3 comments

Comments

@jdandrea
Copy link

jdandrea commented Oct 11, 2016

Using virtualenv 15.0.3, python 2.7.12, pip 8.1.2, wheel 0.30.0.a0, and setuptools 18.5.

Note: If I try installing without a venv it works, no SSL issues. Hence I wanted to check here in case there might be an issue related to virtualenv.

$ virtualenv tester
Installing setuptools, pip, wheel...done.
$ . tester/bin/activate
(tester) $ cd PROJECT
(tester) $ pip install -e .
Obtaining file:///Users/jdandrea/projects/MyProject
    Complete output from command python setup.py egg_info:
    Download error on https://pypi.python.org/simple/pbr/: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590) -- Some packages may not be found!
    Couldn't find index page for 'pbr' (maybe misspelled?)
    Download error on https://pypi.python.org/simple/: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590) -- Some packages may not be found!
    No local packages or working download links found for pbr>=1.8
    Traceback (most recent call last):
    ......

See also: The full traceback.

virtualenv 14.0.6 reportedly solved an SSL issue regarding certs. Maybe this is a different/new issue? Unsure.

@jdandrea
Copy link
Author

jdandrea commented Oct 11, 2016

Interesting. I just discovered that, if I first install pbr manually within the venv, pip install -e . works without any SSL complaints.

I double checked this with a brand new venv:

# go to project directory
$ pip install -e .
Obtaining file:///Users/jdandrea/projects/myproject
    Complete output from command python setup.py egg_info:
    Download error on https://pypi.python.org/simple/pbr/: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590) -- Some packages may not be found!
    Couldn't find index page for 'pbr' (maybe misspelled?)
    Download error on https://pypi.python.org/simple/: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590) -- Some packages may not be found!
    No local packages or working download links found for pbr>=1.8
    Traceback (most recent call last):
    ......
$ pip install pbr>=1.8
$ pip list | grep pbr
pbr (1.10.0)
$ pip install -e
# everything installs, zero errors

I noticed everything was coming from cache though, so I recreated the venv and tried once more, this time using --no-cache-dir.

The install still failed unless I installed pbr @manually as a first step:

$ pip install --no-cache-dir 'pbr>=1.8'
Collecting pbr>=1.8
  Downloading pbr-1.10.0-py2.py3-none-any.whl (96kB)
  ......
Installing collected packages: pbr
Successfully installed pbr-1.10.0
$ pip install --no-cache-dir -e .
# everything installs, zero errors

@jdandrea
Copy link
Author

jdandrea commented Oct 11, 2016

Problem solved! Not a virtualenv issue.

As I'm also using MacPorts, sudo port install curl-ca-bundle (see this post) solved it straight away.

@FilBot3
Copy link

FilBot3 commented Oct 11, 2019

So you just had to install an actual ca-bundle into Python, or tell your OS to use a newer one?

@pypa pypa locked and limited conversation to collaborators Jan 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants