could-not-run-curl-config-errno-2-no-such-file-or-directory-when-installing
1 |
sudo pip install pycurl |
The line of code that throws Could not run curl-config: [Errno 2] No such file or directory” when installing pycurl on Linux, should inform the user as to remedy – a pre-requisite, rather than leaving them to test their google skills.
Error
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
Collecting pycurl Using cached https://files.pythonhosted.org/packages/e8/e4/0dbb8735407189f00b33d84122b9be52c790c7c3b25286826f4e1bdb7bde/pycurl-7.43.0.2.tar.gz Complete output from command python setup.py egg_info: Traceback (most recent call last): File "<string>", line 1, in <module> File "/tmp/pip-install-x2CnFF/pycurl/setup.py", line 913, in <module> ext = get_extension(sys.argv, split_extension_source=split_extension_source) File "/tmp/pip-install-x2CnFF/pycurl/setup.py", line 582, in get_extension ext_config = ExtensionConfiguration(argv) File "/tmp/pip-install-x2CnFF/pycurl/setup.py", line 99, in __init__ self.configure() File "/tmp/pip-install-x2CnFF/pycurl/setup.py", line 227, in configure_unix raise ConfigurationError(msg) __main__.ConfigurationError: Could not run curl-config: [Errno 2] No such file or directory ---------------------------------------- Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-x2CnFF/pycurl/ |
Solution:
A page online is the remedy, and it could have sections like the following for Linux:
1 |
sudo apt-get install libcurl4-openssl-dev |
1 |
sudo apt-get install libssl-dev |
In Debian we saw that I also needed the following packages to fix this error:
1 |
sudo apt install libcurl4-openssl-dev libssl-dev |