1. 程式人生 > >pip安裝pycurl報錯

pip安裝pycurl報錯

pip install pycurl

報錯提示如下:

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.’

網上通用版解決方式

(env)$ pip uninstall pycurl
(env)$ export PYCURL_SSL_LIBRARY=openssl
(env)$ pip install pycurl

可能不能解決問題。

靠譜答案來源:https://stackoverflow.com/questions/51075738/install-pycurl-after-mac-update-to-high-sierra-ssl-error

(env)$ pip uninstall pycurl

(env)$ pip install --upgrade pip

(env)$ export LDFLAGS=-L/usr/local/opt/openssl/lib

(env)$ export CPPFLAGS=-I/usr/local/opt/openssl/include

(env)$ export PYCURL_SSL_LIBRARY=openssl

(env)$ pip install pycurl

安裝成功。