_main__.ConfigurationError: Curl is configured to use SSL, but we have not been able to determine...

mac 系统下安装 pycurl报错:

__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. 安装openssl
  • 虽然Mac自带,但是我用下面查的时候,表示并没有找到想要的ssl.h。
sudo find / -iname ssl.h 
  • 所以重新用homebrew安装一下
brew reinstall openssl
  • 然后会报出安装的信息
brew info openssl
  • 将下面的信息添加到.bashrc 和 .bash_profile文件中 ,然后source 一下。
export PATH="/usr/local/opt/openssl/bin:$PATH"
export LDFLAGS="-L/usr/local/opt/openssl/lib"
export CPPFLAGS="-I/usr/local/opt/openssl/include"
  • 最后,运行下面的代码安装成功。
PYCURL_SSL_LIBRARY=openssl LDFLAGS="-L/usr/local/opt/openssl/lib" CPPFLAGS="-I/usr/local/opt/openssl/include" pip install --no-cache-dir pycurl

你可能感兴趣的:(_main__.ConfigurationError: Curl is configured to use SSL, but we have not been able to determine...)