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 version (7.37.1) is older than compile-time version (7.43.0) #472

Open
nextInnovationUcas opened this issue Jun 14, 2016 · 23 comments

Comments

@nextInnovationUcas
Copy link

nextInnovationUcas commented Jun 14, 2016

hello, i got a problem. i've google many times and still can't solve it.
after i pip install pyspider , and try to run pyspider.it displayed the error
"Error: Could not create web server listening on port 25555
ImportError: pycurl: libcurl link-time version (7.37.1) is older than compile-time version (7.43.0)"
My system is MAC OS YOSEMITE,python 3.5。

@binux
Copy link
Owner

binux commented Jun 14, 2016

The pycurl installed is linked to a different libcurl when execute. It often caused by different version/environment of pip and python. Or wrong LD_LIBRARY_PATH.

And it's a pycurl issue, you should ask in pycurl user group.

@nextInnovationUcas
Copy link
Author

yes,i've used pyenv to manage environment of python(2.7 & 3.5),and 2.7 is system python. maybe i've not configued well of curl link. i'll try more...

@huanghe810229530
Copy link

i have the same problem : ImportError: pycurl: libcurl link-time version (7.43.0) is older than compile-time version (7.49.1)😢

@luckduvip
Copy link

i have the same problem :ImportError: pycurl: libcurl link-time version (7.49.1) is older than compile-time version (7.51.0)

@jizhouli
Copy link

The same problem: ImportError: pycurl: libcurl link-time version (7.49.1) is older than compile-time version (7.51.0)

@huanghe810229530
Copy link

I think is install python a lot, so i remove python2.7.11 and python2.7.13, use python2.7.10 it works.

@orenyomtov
Copy link

orenyomtov commented Jan 2, 2017

ImportError: pycurl: libcurl link-time version (7.49.1) is older than compile-time version (7.51.0)
Did anybody successfully fix this?

@nextInnovationUcas
Copy link
Author

nextInnovationUcas commented Jan 2, 2017 via email

@Ananleexz
Copy link

@nextInnovationUcas
Copy link
Author

nextInnovationUcas commented Jan 3, 2017 via email

@Hiyorimi
Copy link

Hiyorimi commented Jan 18, 2017

Okay, since this answer still pops up in the Google Search, I'll share my workaround for fixing this issue.

Main idea to install brew version of curl and force linking to get an up-to-date curl:

$ curl --version
curl 7.52.1 (x86_64-apple-darwin16.1.0) libcurl/7.52.1 OpenSSL/1.0.2j zlib/1.2.8 nghttp2/1.18.1

So you can later use pycurl, linked against your libcurl and openssl

brew install curl
brew link curl --force
brew install openssl
export LIBRARY_PATH=/usr/local/opt/openssl/lib
export CPATH=/usr/local/opt/openssl/include
pip --no-cache-dir install pycurl
python -c "import pycurl"

Hope that helps!

@binux I believe, issue can be marked as resolved!

@orenyomtov
Copy link

I fixed this error on Mac by upgrading to macOS Sierra.

@seeliuh
Copy link

seeliuh commented Feb 3, 2017

i fixed this error:

  1. uninstall pycurl.
    pip uninstall pycurl
  2. export LD_LIBRARY_PATH=<<your homebrew's libcurl path>>
export LD_LIBRARY_PATH=/usr/local/opt/curl/lib
export LIBRARY_PATH=/usr/local/opt/curl/lib 
  1. reinstall pycurl
    easy_install pycurl

@luckduvip
Copy link

luckduvip commented Feb 4, 2017 via email

@vinay2k2
Copy link

vinay2k2 commented Mar 3, 2017

Thanks @seeliuh It worked for me on Mac.

@rsj217
Copy link

rsj217 commented Apr 28, 2017

I solve this problem by this comand:

brew unlink curl && brew link curl --force
pip uninstall pycurl
env ARCHFLAGS="-Wno-error=unused-command-line-argument-hard-error-in-future" easy_install pycurl

@lilac
Copy link

lilac commented Jul 26, 2017

@seeliuh Thanks. Your workaround works very well without replacing system builtin curl.

@christian0712
Copy link

Solucion para centos pycurl/pycurl#439

@ReroPhoenix
Copy link

i just solved it tho...
I use peppermint...
I deleted all pycurl files on my box and then reinstalled it...

@AnaMakarevich
Copy link

Solved by installing everything with conda. Works even in virtual environments. Reason: conda install pycurl ALSO updates libcurl to match

@crifan
Copy link

crifan commented May 10, 2019

ImportError: pycurl: libcurl link-time version (7.37.1) is older than compile-time version (7.43.0)

here is CentOS 7, same error:

ImportError pycurl libcurl link-time version (7.29.0) is older than compile-time version (7.64.1)

finally fix by:

solution:

reinstall a compatible version 7.43.0.1 pycurl

process:

  1. make sure system python3 installed correct pycurl
pip3 uninstall pycurl
pip3 install pycurl==7.43.0.1 --global-option="--with-nss" --no-cache-dir --ignore-installed
  1. then goto pyspider's pipenv to install pycurl
pipenv shell
pipenv uninstall pycurl
pipenv install pycurl==7.43.0.1

@AlphaNext
Copy link

you should reinstall curl library, for centos user, you can finish it with this link Install curl From Source

@heathf
Copy link

heathf commented Apr 7, 2023

Thank you very much @seeliuh. After two days of screwing with this, your solution finally worked, although I needed to use pip to finally install pycurl instead of easy_install.

You're a lifesaver.

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