SSL backend error when using OpenSSL

前端 未结 26 2378
北恋
北恋 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:33

    This worked for me:

    pip install --compile --install-option="--with-openssl" pycurl

    0 讨论(0)
  • 2020-11-30 23:33

    Error:

    ImportError: pycurl: libcurl link-time ssl backend (openssl) is different from compile-time ssl backend (none/other)

    This worked for me, Mac 10.13, python 3.5, pycurl import worked after installing like this

    pip3 uninstall pycurl;
    
    pip3 install --compile --install-option="--with-openssl" pycurl
    
    0 讨论(0)
  • 2020-11-30 23:34

    With OSX 10.13, a brew-installed openSSL, and virtualenv, I was successful with:

    workon ..your-environment-here..
    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
    
    0 讨论(0)
  • 2020-11-30 23:34

    Recently while upgrading a Django project I had the similar error. But this time setting the environment variable did not work. So I had to set both environment variable export PYCURL_SSL_LIBRARY=openssl and pass the flag --global-option="with-openssl".

    The original answer was posted on this page

    0 讨论(0)
  • 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.

    0 讨论(0)
  • 2020-11-30 23:36

    You can download the tar.gz file from here. Then extract it into a folder. You'll find a setup.py file there. Run the command over there that the site mentioned. For example:

    python setup.py --with-[ssl|gnutls|nss] install
    

    FYI: I tried to install pycurl at my windows, but I couldn't. But did it on my linux.

    0 讨论(0)
提交回复
热议问题