4

I am trying to install pyCurl using easy_install, but I get the following error

In file included from src/docstrings.c:4: src/pycurl.h:170:13: fatal error: 'openssl/crypto.h' file not found include <openssl/crypto.h> 1 error generated. error: Setup script exited with error: command '/usr/bin/clang' failed with exit status 1

The openssl has been installed using brew and the version of it is LibreSSL 2.2.7. I have install xcode tools using xcode-select --install and does not seem to have fixed the issue. I am also getting the same issue while installing using pip.

mykhailo
  • 117
  • 2
  • 14

1 Answers1

15

This might fix your issue.

  $export PYCURL_SSL_LIBRARY=openssl
  $export LDFLAGS="-L/usr/local/opt/openssl/lib"
  $export CPPFLAGS="-I/usr/local/opt/openssl/include"

Now you can easy_install or if you are using pip below should be the command.

$ pip install --no-cache-dir --compile --ignore-installed --install-option="--with-openssl" pycurl
Amit
  • 228
  • 3
  • 8