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.
解决方法
- 抱歉,在这个问题上折腾了半天,终于解决。。。。。。
- 安装openssl
- 虽然Mac自带,但是我用下面查的时候,表示并没有找到想要的ssl.h。
sudo find / -iname ssl.h
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