1

I'm using Python 3.7 on CentOS. I would like to install the pycurl library, but I'm having some trouble ...

(venv) [myuser@server html]$ pip install pycurl 7.19.5
Collecting pycurl
  Using cached https://files.pythonhosted.org/packages/e8/e4/0dbb8735407189f00b33d84122b9be52c790c7c3b25286826f4e1bdb7bde/pycurl-7.43.0.2.tar.gz
    ERROR: Complete output from command python setup.py egg_info:
    ERROR: Traceback (most recent call last):
      File "/tmp/pip-install-3cmwrpw6/pycurl/setup.py", line 223, in configure_unix
        stdout=subprocess.PIPE, stderr=subprocess.PIPE)
      File "/usr/local/lib/python3.7/subprocess.py", line 756, in __init__
        restore_signals, start_new_session)
      File "/usr/local/lib/python3.7/subprocess.py", line 1499, in _execute_child
        raise child_exception_type(errno_num, err_msg, err_filename)
    FileNotFoundError: [Errno 2] No such file or directory: 'curl-config': 'curl-config'

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-3cmwrpw6/pycurl/setup.py", line 913, in <module>
        ext = get_extension(sys.argv, split_extension_source=split_extension_source)
      File "/tmp/pip-install-3cmwrpw6/pycurl/setup.py", line 582, in get_extension
        ext_config = ExtensionConfiguration(argv)
      File "/tmp/pip-install-3cmwrpw6/pycurl/setup.py", line 99, in __init__
        self.configure()
      File "/tmp/pip-install-3cmwrpw6/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: 'curl-config': 'curl-config'
    ----------------------------------------
ERROR: Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-3cmwrpw6/pycurl/

What version of PyCurl is compatible with Python 3.7? Is there something else I'm missing?

Dave
  • 15,639
  • 133
  • 442
  • 830
  • 1
    Do you have curl, libcurl and its development files installed? – Klaus D. Jun 12 '19 at 22:19
  • Possible duplicate of [Python pip install failing with error code 1](https://stackoverflow.com/questions/31481849/python-pip-install-failing-with-error-code-1) – phd Jun 13 '19 at 10:45
  • https://stackoverflow.com/search?q=%5Bcentos%5D+%5Bpycurl%5D+No+such+file+or+directory+curl-config – phd Jun 13 '19 at 10:45
  • @KlausD, when I run "sudo yum install python-devel" I get a message "Package python-devel-2.7.5-77.el7_6.x86_64 already installed and latest version". However, I'm using Python 3.7. – Dave Jun 13 '19 at 16:50

1 Answers1

0

Install python36-devel and gcc and try again.

yum install python36-devel gcc

lennhv
  • 103
  • 6