error installing pycurl on ubuntu 18.04

9,440

Solution 1

I can recommend to install Python-CURL binding with APT:

sudo apt install python-pycurl

If you really need to install it from pip, then you should install curl development package first (to have curl-config installed):

 sudo apt install libcurl4-gnutls-dev

Solution 2

sudo apt install libcurl4-openssl-dev libssl-dev worked on Ubuntu 18.04

Share:
9,440

Related videos on Youtube

lenovolobo
Author by

lenovolobo

Updated on September 18, 2022

Comments

  • lenovolobo
    lenovolobo over 1 year

    i have error when installing pycurl, sorry for a messy first post:

    $ pip -v install pycurl
    
    
      Downloading from URL https://files.pythonhosted.org/packages/e8/e4/0dbb8735407189f00b33d84122b9be52c790c7c3b25286826f4e1bdb7bde/pycurl-7.43.0.2.tar.gz#sha256=0f0cdfc7a92d4f2a5c44226162434e34f7d6967d3af416a6f1448649c09a25a4 (from https://pypi.org/simple/pycurl/)
      Running setup.py (path:/tmp/pip-build-ziZ0H2/pycurl/setup.py) egg_info for package pycurl
        Running command python setup.py egg_info
        Traceback (most recent call last):
          File "<string>", line 1, in <module>
          File "/tmp/pip-build-ziZ0H2/pycurl/setup.py", line 913, in <module>
            ext = get_extension(sys.argv, split_extension_source=split_extension_source)
          File "/tmp/pip-build-ziZ0H2/pycurl/setup.py", line 582, in get_extension
            ext_config = ExtensionConfiguration(argv)
          File "/tmp/pip-build-ziZ0H2/pycurl/setup.py", line 99, in __init__
            self.configure()
          File "/tmp/pip-build-ziZ0H2/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
    Cleaning up...
    Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-ziZ0H2/pycurl/
    Exception information:
    Traceback (most recent call last):
      File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 215, in main
        status = self.run(options, args)
      File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 353, in run
        wb.build(autobuilding=True)
      File "/usr/lib/python2.7/dist-packages/pip/wheel.py", line 749, in build
        self.requirement_set.prepare_files(self.finder)
      File "/usr/lib/python2.7/dist-packages/pip/req/req_set.py", line 380, in prepare_files
        ignore_dependencies=self.ignore_dependencies))
      File "/usr/lib/python2.7/dist-packages/pip/req/req_set.py", line 634, in _prepare_file
        abstract_dist.prep_for_dist()
      File "/usr/lib/python2.7/dist-packages/pip/req/req_set.py", line 129, in prep_for_dist
        self.req_to_install.run_egg_info()
      File "/usr/lib/python2.7/dist-packages/pip/req/req_install.py", line 439, in run_egg_info
        command_desc='python setup.py egg_info')
      File "/usr/lib/python2.7/dist-packages/pip/utils/__init__.py", line 725, in call_subprocess
        % (command_desc, proc.returncode, cwd))
    InstallationError: Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-ziZ0H2/pycurl/
    

    this is only part of the error, it's too long to post

  • tread
    tread almost 5 years
    sudo apt install python3-pycurl