由于libcurl的源码编译因素,在安装pycurl可能会导致以下两种错误。
错误1:
ImportError: pycurl: libcurl link-time ssl backend (openssl) is different from compile-time ssl backend (none/other)
错误2:
ImportError: pycurl: libcurl link-time ssl backend (nss) is different from compile-time ssl backend (openssl)
解决办法:
错误1的解决办法如下:
# pip uninstall pycurl
# export PYCURL_SSL_LIBRARY=openssl
# pip install pycurl
错误2的解决办法如下:
# pip uninstall pycurl
# export PYCURL_SSL_LIBRARY=nss
# pip install pycurl
以下是网上一些更详细的解决办法
pip uninstall pycurl
export PYCURL_SSL_LIBRARY=[nss|openssl|ssl|gnutls]
pip install pycurl
#xor
curl -O https://pypi.python.org/packages/source/p/pycurl/pycurl-7.19.3.1.tar.gz
#...
python setup.py --with-[nss|openssl|ssl|gnutls] install