Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
sawzeeyy opened this issue Mar 14, 2018 · 7 comments

Comments

@sawzeeyy
Copy link

sawzeeyy commented Mar 14, 2018

Any help?

$ python3 handler.py
Traceback (most recent call last):
File "handler.py", line 5, in
import safeurl, types, sys, re, mimetypes, glob, jsbeautifier, urlparse
File "/Users/../../JSParser/safeurl.py", line 17, in
import pycurl
ImportError: pycurl: libcurl link-time ssl backend (openssl) is different from compile-time ssl backend (none/other)

@Regala
Copy link

Regala commented May 31, 2018

Assuming you're on macOS (High Sierra) check the following link - worked for me.

Essentially:
$ brew reinstall openssl
$ pip uninstall pycurl
$ pip install --install-option="--with-openssl" --install-option="--openssl-dir=/usr/local/opt/openssl" pycurl

I'm assuming you've ran setup.py before - if you do
$ python handler.py

Should work now.

@xhzeem
Copy link

xhzeem commented Feb 25, 2019

Hi @Regala I can't uninsatall pycurl on my device I'm getting the error

Cannot uninstall 'pycurl'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.

@attacker34
Copy link

Hi @Regala I can't uninsatall pycurl on my device I'm getting the error

Cannot uninstall 'pycurl'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.

Use

sudo pip uninstall pycurl

@clirimemini
Copy link

For those who can't fix this on MacOS:

brew install pipenv
pipenv shell
export CPPFLAGS=-I/usr/local/opt/openssl/include
export LDFLAGS=-L/usr/local/opt/openssl/lib
pip install pycurl --global-option="--with-openssl"

@P1kAju
Copy link

P1kAju commented Dec 1, 2019

Hi @sawzeeyy I'm pretty sure
image

@P1kAju
Copy link

P1kAju commented Dec 1, 2019

Wow @sawzeeyy
My hard change finally Successfully

  • remove existing pycurl installation
    pip3 uninstall pycurl

  • export variable with your link-time ssl backend (which is openssl above)
    export PYCURL_SSL_LIBRARY=openssl

  • then, re-install pycurl with no cache
    pip3 install pycurl --no-cache-dir

next question😂
image

@FightingSuperYan
Copy link

if you use “pip install pycurl" in your anaconda virtulenvironment this problem may occur,i use "conda install pycurl",then this problem is solved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants