Virtualenv: pip install en macOS venv devuelve SSL CERTIFICATE_VERIFY_FAILED

Creado en 11 oct. 2016  ·  3Comentarios  ·  Fuente: pypa/virtualenv

Usando virtualenv 15.0.3, python 2.7.12, pip 8.1.2, wheel 0.30.0.a0 y setuptools 18.5.

Nota: si trato de instalar _sin_ un venv, funciona, no hay problemas de SSL. Por lo tanto, quería verificar aquí en caso de que haya un problema relacionado con 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):
    ......

Ver también: El rastreo completo .

Según se informa, virtualenv 14.0.6 resolvió un problema de SSL con respecto a los certificados. ¿Quizás este es un problema diferente/nuevo? Inseguro.

Comentario más útil

Interesante. Acabo de descubrir que, si primero instalo pbr manualmente dentro de venv, pip install -e . funciona sin quejas de SSL.

Verifiqué dos veces esto con un nuevo 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

Sin embargo, noté que todo provenía del caché, así que recreé el venv y lo intenté una vez más, esta vez usando --no-cache-dir .

La instalación aún falló a menos que instalé pbr @manualmente como primer paso:

$ 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

Todos 3 comentarios

Interesante. Acabo de descubrir que, si primero instalo pbr manualmente dentro de venv, pip install -e . funciona sin quejas de SSL.

Verifiqué dos veces esto con un nuevo 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

Sin embargo, noté que todo provenía del caché, así que recreé el venv y lo intenté una vez más, esta vez usando --no-cache-dir .

La instalación aún falló a menos que instalé pbr @manualmente como primer paso:

$ 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

¡Problema resuelto! No es un problema de virtualenv.

Como también estoy usando MacPorts, sudo port install curl-ca-bundle ( ver esta publicación ) lo resolvió de inmediato.

Entonces, ¿simplemente tuvo que instalar un paquete ca real en Python o decirle a su sistema operativo que use uno más nuevo?

¿Fue útil esta página
0 / 5 - 0 calificaciones

Temas relacionados

mitchhentges picture mitchhentges  ·  3Comentarios

oconnor663 picture oconnor663  ·  3Comentarios

jwarren116 picture jwarren116  ·  5Comentarios

schlamar picture schlamar  ·  4Comentarios

Tset-Noitamotua picture Tset-Noitamotua  ·  4Comentarios