1、pycurl 运行时抛出异常
设置环境变量 PYCURL_SSL_LIBRARY
# ImportError: pycurl: libcurl link-time ssl backend (nss)
# is different from compile-time ssl backend (openssl)
pip uninstall pycurl
export PYCURL_SSL_LIBRARY=nss
easy_install pycurl
2、mac下安装M2Crypto出错
安装前先设定openssl环境变量
export LDFLAGS="-L$(brew --prefix openssl)/lib"
export CFLAGS="-I$(brew --prefix openssl)/include"
export SWIG_FEATURES="-cpperraswarn -includeall -I$(brew --prefix openssl)/include"
3、centos pycurl 安装问题
.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.
export PYCURL_SSL_LIBRARY=openssl
Could not run curl-config: [Errno 2] No such file or directory: 'curl-config'
yum install libcurl-devel
src/pycurl.h:164:28: fatal error: openssl/ssl.h: No such file or directory
yum
install
-y openssl-devel
fatal error: Python.h: No such file or directory
yum install python-devel
NAME="nss"
pip uninstall pycurl
export PYCURL_SSL_LIBRARY=${NAME}
pip install --compile --global-option="--with-${NAME}" pycurl