Virtualenv: pip install auf macOS venv gibt SSL CERTIFICATE_VERIFY_FAILED zurück

Erstellt am 11. Okt. 2016  ·  3Kommentare  ·  Quelle: pypa/virtualenv

Verwenden von virtualenv 15.0.3, Python 2.7.12, Pip 8.1.2, Rad 0.30.0.a0 und Setuptools 18.5.

Hinweis: Wenn ich versuche, _ohne_ ein venv zu installieren, funktioniert es, keine SSL-Probleme. Daher wollte ich hier nachsehen, ob es ein Problem im Zusammenhang mit virtualenv geben könnte.

$ 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):
    ......

Siehe auch: Das vollständige Traceback .

virtualenv 14.0.6 hat Berichten zufolge ein SSL-Problem in Bezug auf Zertifikate gelöst . Vielleicht ist das ein anderes/neues Problem? Unsicher.

Hilfreichster Kommentar

Interessant. Ich habe gerade festgestellt, dass, wenn ich zuerst pbr manuell innerhalb des venv installiere, pip install -e . ohne SSL-Beschwerden funktioniert.

Ich habe dies mit einem brandneuen Venv überprüft:

# 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

Ich bemerkte jedoch, dass alles aus dem Cache kam, also habe ich das venv neu erstellt und es noch einmal versucht, diesmal mit --no-cache-dir .

Die Installation ist immer noch fehlgeschlagen, es sei denn, ich habe pbr @manuell als ersten Schritt installiert:

$ 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

Alle 3 Kommentare

Interessant. Ich habe gerade festgestellt, dass, wenn ich zuerst pbr manuell innerhalb des venv installiere, pip install -e . ohne SSL-Beschwerden funktioniert.

Ich habe dies mit einem brandneuen Venv überprüft:

# 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

Ich bemerkte jedoch, dass alles aus dem Cache kam, also habe ich das venv neu erstellt und es noch einmal versucht, diesmal mit --no-cache-dir .

Die Installation ist immer noch fehlgeschlagen, es sei denn, ich habe pbr @manuell als ersten Schritt installiert:

$ 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

Problem gelöst! Kein virtualenv-Problem.

Da ich auch MacPorts verwende, hat sudo port install curl-ca-bundle ( siehe diesen Beitrag ) es sofort gelöst.

Sie mussten also nur ein aktuelles CA-Bundle in Python installieren oder Ihrem Betriebssystem mitteilen, dass es ein neueres verwenden soll?

War diese Seite hilfreich?
0 / 5 - 0 Bewertungen