Amer Cyber
Amer Cyber

Reputation: 1

Trouble in installation pycurl

I really have trouble installing pycurl on my Mac, spent few hours trying solve it but unfortunately I did not find any useful solution.

When I execute: pip install pycurl or pip3.6 install pycurl I got the following error:

      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:
      Using curl-config (libcurl 7.54.0)
      Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/7j/6928gb292nq4rscm2nwxbnfr0000gn/T/pip-install-yozxmkui/pycurl/setup.py", line 913, in <module>
        ext = get_extension(sys.argv, split_extension_source=split_extension_source)
      File "/private/var/folders/7j/6928gb292nq4rscm2nwxbnfr0000gn/T/pip-install-yozxmkui/pycurl/setup.py", line 582, in get_extension
        ext_config = ExtensionConfiguration(argv)
      File "/private/var/folders/7j/6928gb292nq4rscm2nwxbnfr0000gn/T/pip-install-yozxmkui/pycurl/setup.py", line 99, in __init__
        self.configure()
      File "/private/var/folders/7j/6928gb292nq4rscm2nwxbnfr0000gn/T/pip-install-yozxmkui/pycurl/setup.py", line 316, in configure_unix
        specify the SSL backend manually.''')
    __main__.ConfigurationError: Curl is configured to use SSL, but we have not been able to determine which SSL backend it is using. Please see PycURL documentation for how to specify the SSL backend manually.

Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/7j/6928gb292nq4rscm2nwxbnfr0000gn/T/pip-install-yozxmkui/pycurl/

Any help would be appreciated.

Upvotes: 0

Views: 1848

Answers (2)

deeno35
deeno35

Reputation: 11

The previous answer didn't solve it for me exactly. I had to set LDFLAGS and CPPFLAGS first for it to build and thus install properly. brew install openssl alluded to these env vars and what they should be set to:

export LDFLAGS=-L/usr/local/opt/openssl/lib

export CPPFLAGS=-I/usr/local/opt/openssl/include

pip install pycurl --with-openssl

Upvotes: 1

tung yu
tung yu

Reputation: 94

According to the official doc. of pycurl

PycURL requires that the SSL library that it is built against is the same one libcurl, and therefore PycURL, uses at runtime. PycURL’s setup.py uses curl-config to attempt to figure out which SSL library libcurl was compiled against, however this does not always work.

I am not sure if this is the problem you having. But maybe you should try using --with-openssl to specify the SSL library to use.

Upvotes: 0

Related Questions