ImportError: pycurl: libcurl link-time ssl backend (openssl) is different from compile-time ssl backend (none/other)完美解决办法


解决办法:
命令行输入:
pip uninstall pycurl

export CPPFLAGS=-I/usr/local/opt/openssl/include
export LDFLAGS=-L/usr/local/opt/openssl/lib

pip install pycurl –global-option=”–with-openssl”

同时还有overflow高赞方法:

首先移除安装的pycurl

pip uninstall pycurl

然后

export PYCURL_SSL_LIBRARY=openssl

重新安装pycurl,并且必须带有参数表示无缓存的条件下

pip install pycurl –no-cache-dir

我使用的是virtualenv虚拟环境。