How to install pycurl on Apple M1 Silicon using pip v23.1+

465 views Asked by At

Installing pycurl on computers with Apple M1 chips has always been a struggle. I have been using this command to install pycurl with OpenSSLv3 using pip:

brew update && brew install openssl
export LDFLAGS="-L/opt/homebrew/opt/openssl@3/lib"
export CPPFLAGS="-I/opt/homebrew/opt/openssl@3/include"
pip uninstall pycurl
pip install --compile --install-option="--with-openssl" pycurl

But in pip v23.1+ (see here), the --install-option has been removed and I can't figure out how to create an equivalent command.

2

There are 2 answers

0
FlyingTeller On

The reason --install-option was removed is that the setup.py install mode of installing packages has been deprecated and subsequently removed. So there is no way to tell pip to pass something to setup.py, as it is no longer being called, see also here.

I suggest you download the pycurl sources and then manually call

 python setup.py --with-openssl install
1
saradruid On
pip install --no-cache-dir --compile --ignore-installed  --config-setting="--build-option=--with-openssl" pycurl