_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
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容