Curl配置为使用SSL,但我们无法确定它正在使用哪个SSL后端

Zor*_*gan 13 python terminal ssl pip

当我执行时,pip install thumbor我收到以下错误:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/private/var/folders/t9/***********************/T/pip-install-knrabyuy/pycurl/setup.py", line 913, in <module>
    ext = get_extension(sys.argv, split_extension_source=split_extension_source)
  File "/private/var/folders/t9/***********************/T/pip-install-knrabyuy/pycurl/setup.py", line 582, in get_extension
    ext_config = ExtensionConfiguration(argv)
  File "/private/var/folders/t9/***********************/T/pip-install-knrabyuy/pycurl/setup.py", line 99, in __init__
    self.configure()
  File "/private/var/folders/t9/***********************/T/pip-install-knrabyuy/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.
Run Code Online (Sandbox Code Playgroud)

我已经尝试过brew install curl(这是成功的)但是当我执行时我得到了同样的错误pip install thumbor.

知道为什么吗?

小智 43

好像你安装了pycurl错误.如果安装在centos上试试这个:export PYCURL_SSL_LIBRARY=openssl.如果在macos上安装试试这个:

export PYCURL_SSL_LIBRARY=openssl
export LDFLAGS=-L/usr/local/opt/openssl/lib
export CPPFLAGS=-I/usr/local/opt/openssl/include
Run Code Online (Sandbox Code Playgroud)

然后运行 pip install pycurl


Nag*_*gev 0

我无法使用 Software Collections 中的 Python 3.6 解决此错误,因此我从同一存储库安装了Python 3.5 。

然后我安装了 Pycurl:

sudo yum install sclo-python35-python-pycurl
Run Code Online (Sandbox Code Playgroud)

效果很好。我使用 3.5 的原因是因为 3.6 没有类似的软件包。因此,您可能想尝试在包管理器上找到您正在使用的版本的 Pycurl,然后以这种方式安装它。