Azure-functions-core-tools: Can't install pycurl to python function

Created on 21 Feb 2019  路  2Comments  路  Source: Azure/azure-functions-core-tools

I added pycurl to requirements.txt as following.

requirements.txt

pycurl==7.43.0

When executing func command in order to deploy python function, I got following error.

$ func azure functionapp publish <function_app_name> --build-native-deps
Getting site publishing info...
Running 'docker pull mcr.microsoft.com/azure-functions/python:2.0.12285'...done
Running 'docker run --rm -d mcr.microsoft.com/azure-functions/python:2.0.12285'...done
Running 'docker exec -t 6dc22c mkdir -p /home/site/wwwroot/'..done

  :

Collecting pycurl==7.43.0 (from -r requirements.txt (line 7))
  Downloading https://files.pythonhosted.org/packages/12/3f/557356b60d8e59a1cce62ffc07ecc03e4f8a202c86adae34d895826281fb/pycurl-7.43.0.tar.gz (182kB)

  : 

    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "/tmp/pip-install-9bu40h2p/pycurl/setup.py", line 103, in configure_unix
        stdout=subprocess.PIPE, stderr=subprocess.PIPE)
      File "/root/.pyenv/versions/3.6.6/lib/python3.6/subprocess.py", line 709, in __init__
        restore_signals, start_new_session)
      File "/root/.pyenv/versions/3.6.6/lib/python3.6/subprocess.py", line 1344, 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-9bu40h2p/pycurl/setup.py", line 823, in <module>
        ext = get_extension(sys.argv, split_extension_source=split_extension_source)
      File "/tmp/pip-install-9bu40h2p/pycurl/setup.py", line 497, in get_extension
        ext_config = ExtensionConfiguration(argv)
      File "/tmp/pip-install-9bu40h2p/pycurl/setup.py", line 71, in __init__
        self.configure()
      File "/tmp/pip-install-9bu40h2p/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: 'curl-config': 'curl-config'

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-9bu40h2p/pycurl/

Could you please help me to install pycurl?
Isn't pycurl supoorted?

Most helpful comment

try adding --additional-packages "libcurl4-openssl-dev libssl-dev" to your command.

All 2 comments

try adding --additional-packages "libcurl4-openssl-dev libssl-dev" to your command.

Thanks @ahmelsayed !

It was deployed successfully.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lastcoolnameleft picture lastcoolnameleft  路  4Comments

Kaushik27 picture Kaushik27  路  5Comments

brandonh-msft picture brandonh-msft  路  4Comments

frozenbubble picture frozenbubble  路  4Comments

buragc picture buragc  路  6Comments