Skip to content

ssl error when using pip  #1

@kyp76

Description

@kyp76

Hi, When I m using pip on a virtualenv on MacOS, I have this error.
"pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available"

The reason is this one :
openssl is keg-only, which means it was not symlinked into /usr/local,
because Apple has deprecated use of OpenSSL in favor of its own TLS and crypto libraries

To resolve this Apple decision, you have to export this both variables, before compiling Python.
export LDFLAGS="-L/usr/local/opt/openssl/lib"
export CPPFLAGS="-I/usr/local/opt/openssl/include"

So it is possible to add these lignes :
if [ $(uname -sm) == "Darwin x86_64" ];then
export LDFLAGS="-L/usr/local/opt/openssl/lib"
export CPPFLAGS="-I/usr/local/opt/openssl/include"
fi
ligne 152, of you pyv.sh script ?

Best regards.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions