2015年08月30日

pip install pycurlがエラーになった

エラーメッセージは下記。

  Downloading pycurl-7.19.5.1.tar.gz (142kB)
    100% |████████████████████████████████| 143kB 2.1MB/s 
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "", line 20, in 
      File "/tmp/pip-build-VDcOQE/pycurl/setup.py", line 634, in 
        ext = get_extension(split_extension_source=split_extension_source)
      File "/tmp/pip-build-VDcOQE/pycurl/setup.py", line 392, in get_extension
        ext_config = ExtensionConfiguration()
      File "/tmp/pip-build-VDcOQE/pycurl/setup.py", line 65, in __init__
        self.configure()
      File "/tmp/pip-build-VDcOQE/pycurl/setup.py", line 100, 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-build-VDcOQE/pycurl
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning

libcurlのdevがいるらしい。

Ubuntuの場合、下記で解消した。

# apt-get install libcurl4-gnutls-dev