[Python] SSL module in Python is not available (on OSX)

Discussão em 'Python' iniciado por Stack, Dezembro 9, 2024.

  1. Stack

    Stack Membro Participativo

    I'm having trouble running pip install in a virtualenv on OSX 10.13. I already have run brew install openssl and the path /usr/local/include/openssl points to ../opt/openssl/include/openssl. Does anyone know how to fix this? This started happening after I reinstalled python using brew install.


    pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available. Collecting Pillow Could not fetch URL https://pypi.python.org/simple/pillow/: There was a problem confirming the ssl certificate: Can't connect to HTTPS URL because the SSL module is not available. - skipping Could not find a version that satisfies the requirement Pillow (from versions: ) No matching distribution found for Pillow
    ​

    UPDATE: Here's some more info:

    ✗ which python
    /usr/local/opt/python/libexec/bin/python


    ✗ which pip
    /usr/local/opt/python/libexec/bin/pip


    ✗ python --version
    Python 3.7.4


    ✗ pip --version
    pip 19.1.1 from /usr/local/lib/python3.7/site-packages/pip (python 3.7)


    ✗ brew info python
    python: stable 3.7.4 (bottled), HEAD
    Interpreted, interactive, object-oriented programming language
    https://www.python.org/
    /usr/local/Cellar/python/3.6.5_1 (4,795 files, 100.0MB)
    Poured from bottle on 2019-10-08 at 14:39:37
    /usr/local/Cellar/python/3.7.4_1 (3,903 files, 60.6MB) *
    Poured from bottle on 2019-10-08 at 14:37:10
    From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/python.rb


    Yes, I have both 3.6.5_1 and 3.7.4_1 installed as I may need to switch between the two at times.

    ✗ brew unlink openssl
    Unlinking /usr/local/Cellar/openssl/1.0.2s... 0 symlinks removed

    Continue reading...

Compartilhe esta Página