3

Import pycurl ImportError: pycurl: libcurl link-time ssl backends (schannel) do not include compile-time ssl backend (openssl) My system is Windows 10 and I used python 3.9.7 I used pycurl 7.44.1 By downloading .whl Installed

Tried methods 1.PYCURL_SSL_LIBRARY=openssl 2.pip install pycurl Error Please specify --curl-dir=/path/to/built/libcurl Only through By downloading .whl Installed 3.Use lower version Pycurl

Lance
  • 31
  • 2
  • I have answer given here for windows and Mac. You can pick the windows one https://stackoverflow.com/questions/47888757/importerror-pycurl-libcurl-link-time-ssl-backend-openssl-is-different-from-c/69461885#69461885 – Blue Clouds Oct 06 '21 at 13:16
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Oct 07 '21 at 13:12

1 Answers1

0

For Mac: If you are still looking for a proper way to work around this then do the following

Step 1: Uninstall PyCurl

pip uninstall pycurl

Step 2: Reinstall Open SSL using Brew

brew reinstall openssl

Copy the location of CPPFLAGS and LDFLAGS which will be prompted to you while installing openssl.

Then Paste those values in the command prompt.

export CPPFLAGS=-I/usr/local/brew/openssl/include 
export LDFLAGS=-L/usr/local/brew/openssl/lib # may be needed

NOTE: The location of these flags would be different for you, So copy-paste it correctly while reinstalling OpenSSL

pip install --no-cache-dir --compile --ignore-installed --install-option="--with-openssl" pycurl

You should be able to install pycurl without any issues now.

  • This results in `error: legacy-install-failure` on arm64 Mac m1. – Michael Jul 08 '22 at 18:05
  • What worked for me: `PYCURL_SSL_LIBRARY=openssl LDFLAGS="-L/opt/homebrew/opt/openssl@3/lib" CPPFLAGS="-I/opt/homebrew/opt/openssl@3/include" pip3 install --no-cache-dir pycurl` – Michael Jul 08 '22 at 18:12