opensuse安装pycurl失败记录
早上在opensuse安装pycurl,一直出现如下错误:
pepper@VM_56_243_suse:~/code/gitosis-autotest> pip install pycurl Collecting pycurl Using cached pycurl-7.43.0.tar.gz Complete output from command python setup.py egg_info: Traceback (most recent call last): File "/tmp/pip-build-szzjpohn/pycurl/setup.py", line 103, in configure_unix stdout=subprocess.PIPE, stderr=subprocess.PIPE) File "/home/pepper/.pyenv/versions/3.5.3/lib/python3.5/subprocess.py", line 676, in __init__ restore_signals, start_new_session) File "/home/pepper/.pyenv/versions/3.5.3/lib/python3.5/subprocess.py", line 1282, in _execute_child raise child_exception_type(errno_num, err_msg) FileNotFoundError: [Errno 2] No such file or directory: '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-build-szzjpohn/pycurl/setup.py", line 823, in <module> ext = get_extension(sys.argv, split_extension_source=split_extension_source) File "/tmp/pip-build-szzjpohn/pycurl/setup.py", line 497, in get_extension ext_config = ExtensionConfiguration(argv) File "/tmp/pip-build-szzjpohn/pycurl/setup.py", line 71, in __init__ self.configure() File "/tmp/pip-build-szzjpohn/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' ---------------------------------------- Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-szzjpohn/pycurl/
经过查询后,了解到需要先安装 libcurl-devel
执行以下命令解决:
zypper in libcurl-devel
接着重新安装pycurl:
pip uninstall pycurl 先卸载之前安装的,如果没有安装成功就不要卸载了
执行 export PYCURL_SSL_LIBRARY=openssl
最后 pip install pycurl 再次安装
做个笔记记录下