Celery uses a package called kombu, which requires the pycurl library to communicate with sqs, but installing pycurl has never come easy to me. even though sometimes it gets installed through pip, when I start celery it was saying pycurl library is required. the problem lies with the ssl library requirement of pycurl Here is a set of commands which worked for me
brew install curl --with-openssl
export PYCURL_SSL_LIBRARY=openssl
pip uninstall pycurl
pip install --no-cache-dir --global-option=build_ext --global-option="-L/usr/local/opt/openssl/lib" --global-option="I/usr/local/opt/openssl/include" --user pycurl
Tried numerous ways to install pycurl using pip but somehow it requires libraries related to ssl, and from its error messages it was really hard to get which one its requires and where it looks for the library so i have tried to compile it from source, so some of the requirements installed from the source,
sudo apt-get install python3.6-dev
sudo apt-get install build-essential fakeroot dpkg-dev
mkdir ~/python-pycurl-openssl
cd ~/python-pycurl-openssl
sudo apt-get source python-pycurl
sudo apt-get build-dep python-pycurl
sudo apt-get install libcurl4-openssl-dev
sudo dpkg-source -x pycurl_x.x.x-0ubuntu3.dsc
cd pycurl-7.x.x
- edit debian/control file and replace all instances of 'libcurl4-gnutls-dev' with 'libcurl4-openssl-dev' (7 changes)
if you want to continue using gnutls dont change anything for me this got worked
sudo PYCURL_SSL_LIBRARY=openssl dpkg-buildpackage -rfakeroot -b
sudo dpkg -i ../python-pycurl_x.x.x-0ubuntu3_amd64.deb