yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gcc make libcurl-devel
configure --prefix=/usr/local出现的问题
configure: error: no acceptable C compiler found in $PATH
由于本机缺少gcc编译环境
yum install -y gcc
FileNotFoundError: [Errno 2] No such file or directory: 'curl-config': 'curl-config'
yum install libcurl-devel -y
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
ImportError: pycurl: libcurl link-time ssl backend (nss) is different from compile-time ssl backend (openssl)
export PYCURL_SSL_LIBRARY=nss
解决pycurl安装错误
由于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