Partly pulled from the comments here: pycurl/pycurl#526
May also be a fix for this error:
ImportError: pycurl: libcurl link-time ssl backend (none/other) is different from compile-time ssl backend (openssl)
If you try to install PycURL and receive this error:
Curl is configured to use SSL, but we have not been able to determine which SSL backend it is using
Here's one way to fix. First, the pre-requisites:
- Install Xcode command line tools with
xcode-select --install
if they aren't already. - Install Homebrew if you don't have it already: https://brew.sh/
- Uninstall your current version of cURL if you have one installed.
- Uninstall your current version of PycURL.
Then do the following:
- Use
brew install curl --with-openssl
to install cURL - Run
export PYCURL_SSL_LIBRARY=openssl
to set the library for PycURL - Run the following commmand (really 3 commands in 1) to tell the compiler where to find openssl, then download and compile pycurl with pip.
export LDFLAGS=-L/usr/local/opt/openssl/lib;export CPPFLAGS=-I/usr/local/opt/openssl/include; pip install pycurl --compile --no-cache-dir
This worked! Thank you!
Note I had to run
pip uninstall pycurl
first.