SSL backend error when using OpenSSL

前端 未结 26 2552
北恋
北恋 2020-11-30 22:38

I was trying to install pycurl in a virtualenv using pip and I got this error

ImportError: pycurl: libcurl link-time ssl backend (openssl) is different from         


        
26条回答
  •  一生所求
    2020-11-30 23:35

    I tried everything here on macOS 10.13 with no success. Then I found https://gist.github.com/webinista/b4b6a4cf8f158431b2c5134630c2cbfe which worked:

    brew install curl --with-openssl
    pip uninstall pycurl
    export PYCURL_SSL_LIBRARY=openssl
    export LDFLAGS=-L/usr/local/opt/openssl/lib;export CPPFLAGS=-I/usr/local/opt/openssl/include; pip install pycurl --compile --no-cache-dir
    

    This worked for me both when not using a virtualenv and within a virtualenv.

提交回复
热议问题