Nagen Sahu
Nagen Sahu

Reputation: 1

ImportError: pycurl: libcurl link-time version (8.1.2) is older than compile-time version (8.4.0) MacOS 14.0 Sonoma

Context - I'm not a Python developer by trade and have always developed in the cloud, but now need to make a simple Python script that uses Pycurl to download data. I've been struggling with getting pycurl to work on my mac. I've tried every variant of the answers listed-

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

ImportError: pycurl: libcurl link-time version (7.79.1) is older than compile-time version (7.84.0)

libcurl link-time version (7.76.1) is older than compile-time version (7.86.0)

Mac Os X: "libcurl link-time version (7.43.0) is older than compile-time version (7.51.0)"

https://github.com/binux/pyspider/issues/472

https://gist.github.com/enfont/70b87caca1a16fabb8c9e9e4e142f099

NOTHING WORKS !

I have managed to setup a folder with pyenv to isolate versioning etc.

Brew is set to a newer version- brew info curl ==> curl: stable 8.9.0 (bottled), HEAD [keg-only]

curl version is always the older version curl --version curl 8.1.2 (x86_64-apple-darwin23.0) libcurl/8.1.2 (SecureTransport) LibreSSL/3.3.6 zlib/1.2.12 nghttp2/1.55.1

I also have a specific version of curl 8.4.0 in the folder where pyenv is activated and have PATH, LDFLAGS and CPPFLAGS set

export PATH="$(pwd)/curl-8.4.0/bin:$PATH" export LDFLAGS="-L$(pwd)/curl-8.4.0/lib -L/opt/homebrew/opt/openssl@3/lib" export CPPFLAGS="-I$(pwd)/curl-8.4.0/include -I/opt/homebrew/opt/openssl@3/include"

Also had setup LD_LIBRARY_PATH as suggested in some SE posts.

What's worse is that there are no solutions out there for macos Sonoma. How do i get Pycurl to stop throwing this error ?

Upvotes: 0

Views: 173

Answers (1)

Danh Văn Võ
Danh Văn Võ

Reputation: 1

I got the same issue, I fixed it by installing pycurl from the GitHub

 git clone https://github.com/pycurl/pycurl.git
 cd pycurl
 python setup.py install
 python -c "import pycurl"

Upvotes: 0

Related Questions