Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

easy_install - pyCurl install issue

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.

like image 950
mykhailo Avatar asked Dec 05 '22 13:12

mykhailo


1 Answers

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
like image 80
Amit Avatar answered Jan 03 '23 02:01

Amit