Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error when trying to install pycurl

Tags:

python-2.7

I'm having an issue when running a python script, I'm getting below mentioned error

"ImportError: No module named pycurl"

I tried to resolve this by trying this command "sudo pip install pycurl" and I got this error

Downloading/unpacking pycurl Downloading pycurl-7.43.0.tar.gz (182kB): 182kB downloaded Running setup.py (path:/tmp/pip-build-vqUn8V/pycurl/setup.py) egg_info for package pycurl Traceback (most recent call last): File "", line 17, in File "/tmp/pip-build-vqUn8V/pycurl/setup.py", line 823, in ext = get_extension(sys.argv, split_extension_source=split_extension_source) File "/tmp/pip-build-vqUn8V/pycurl/setup.py", line 497, in get_extension ext_config = ExtensionConfiguration(argv) File "/tmp/pip-build-vqUn8V/pycurl/setup.py", line 71, in init self.configure() File "/tmp/pip-build-vqUn8V/pycurl/setup.py", line 107, in configure_unix raise ConfigurationError(msg) main.ConfigurationError: Could not run curl-config: [Errno 2] No such file or directory Complete output from command python setup.py egg_info: Traceback (most recent call last):

File "", line 17, in

File "/tmp/pip-build-vqUn8V/pycurl/setup.py", line 823, in

ext = get_extension(sys.argv, split_extension_source=split_extension_source)

File "/tmp/pip-build-vqUn8V/pycurl/setup.py", line 497, in get_extension

ext_config = ExtensionConfiguration(argv)

File "/tmp/pip-build-vqUn8V/pycurl/setup.py", line 71, in init

self.configure()

File "/tmp/pip-build-vqUn8V/pycurl/setup.py", line 107, in configure_unix

raise ConfigurationError(msg)

main.ConfigurationError: Could not run curl-config: [Errno 2] No such file or directory


Cleaning up...
Command python setup.py egg_info failed with error code 1 in /tmp/pip-build-vqUn8V/pycurl
Storing debug log for failure in /root/.pip/pip.log

like image 510
Ahmed Al Abdulaal Avatar asked Apr 19 '16 11:04

Ahmed Al Abdulaal


1 Answers

Are you running Debian? It worked for me after installing the following packages:

sudo apt install libcurl4-openssl-dev libssl-dev
like image 184
Danis Fermi Avatar answered Sep 18 '22 19:09

Danis Fermi