Matt Seymour

When installing pycurl via pip a number of errors can occur during the build process. The most likely cause of this is missing dependencies which are required to build the package. The good news is this can be easily fixed by installing the missing libraries and retrying the install.

Example error raised by pip when installing pycurl:

In file included from src/docstrings.c:4:0:
src/pycurl.h:145:31: fatal error: openssl/crypto.h: No such file or directory
 #   include <openssl/crypto.h>
                               ^
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

Solution

Within Ubuntu install sudo apt-get install libssl-dev libcurl4-openssl-dev python-dev. Then re-run the pip install pycurl command to install the package without error.