ImportError: pycurl: libcurl link-time ssl backend (openssl) is different from compile-time ssl backend (none/other)

匆匆过客 提交于 2019-12-10 11:37:55

问题


I wanted to run python file. But I could check this error when I ran it.

ImportError: pycurl: libcurl link-time ssl backend (openssl) is different from compile-time ssl backend (none/other)

My system is Mac os 10.13.2 and I used python 2.7


回答1:


Looks like something went wrong with pycurl/openssl, try this:

pip uninstall pycurl
pip install --compile --install-option="--with-openssl" pycurl

if still fails, try this as well

brew reinstall openssl



回答2:


Reinstall the curl libraries

brew install curl --with-openssl

Install pycurl with correct environment and paths

export PYCURL_SSL_LIBRARY=openssl
pip uninstall pycurl 
pip install --no-cache-dir --global-option=build_ext --global-option="-L/usr/local/opt/openssl/lib" --global-option="-I/usr/local/opt/openssl/include"  pycurl


来源:https://stackoverflow.com/questions/47888757/importerror-pycurl-libcurl-link-time-ssl-backend-openssl-is-different-from-c

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!