'ImportError: pycurl: libcurl link-time ssl backends (schannel) do not include compile-time ssl backend (openssl)

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



Solution 1:[1]

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.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 GuruOfAll007