pycurl macOs安装问题

时间:2018-06-17 14:22:30

标签: macos install pycurl

我需要安装pycurl才能运行python脚本,但我无法找到在MacO上执行此操作的方法。 我已经尝试过brew,更新Pip但是我总是收到这个错误" pip install pycurl"

收集pycurl   使用缓存的https://files.pythonhosted.org/packages/e8/e4/0dbb8735407189f00b33d84122b9be52c790c7c3b25286826f4e1bdb7bde/pycurl-7.43.0.2.tar.gz     从命令python setup.py egg_info完成输出:     使用curl-config(libcurl 7.54.0)     Traceback(最近一次调用最后一次):       文件"",第1行,

  File "/private/var/folders/vk/f193293d0pvd2ynlcpnyx9100000gn/T/pip-install-rxidIQ/pycurl/setup.py", line 913, in <module>
    ext = get_extension(sys.argv, split_extension_source=split_extension_source)
  File "/private/var/folders/vk/f193293d0pvd2ynlcpnyx9100000gn/T/pip-install-rxidIQ/pycurl/setup.py", line 582, in get_extension
    ext_config = ExtensionConfiguration(argv)
  File "/private/var/folders/vk/f193293d0pvd2ynlcpnyx9100000gn/T/pip-install-rxidIQ/pycurl/setup.py", line 99, in __init__
    self.configure()
  File "/private/var/folders/vk/f193293d0pvd2ynlcpnyx9100000gn/T/pip-install-rxidIQ/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.

有什么建议吗?

1 个答案:

答案 0 :(得分:1)

最近版本的curl支持多个ssl后端,而pycurl无法确定在安装期间使用哪个版本。这是7.43.0.2中的一个已知问题(https://github.com/pycurl/pycurl/issues/530)。很多人说要安装带有openssl支持的curl,但是在macOS上最好使用默认的SecureTransport并让系统访问钥匙串,而不是在openssl中使用捆绑的证书。

尝试安装7.43.0.1来解决问题。

pip install pycurl==7.43.0.1

如果这不起作用,请执行以下操作:

brew link curl
export LDFLAGS="-L/usr/local/opt/curl/lib"
export CPPFLAGS="-I/usr/local/opt/curl/include"

然后重试

pip install pycurl==7.43.0.1