我试图使用 pip 在 virtualenv 中安装 pycurl 并收到此错误
ImportError: pycurl: libcurl link-time ssl backend (openssl) is different from compile-time ssl backend (none/other)
我读过一些文档说“要解决此问题,您需要告诉 setup.py 使用什么 SSL 后端” (source) https://github.com/pycurl/pycurl虽然我不知道如何做到这一点,因为我使用 pip 安装了 pycurl。
使用 pip 安装 pycurl 时如何指定 SSL 后端?
Thanks
对大多数人来说
阅读他们的安装文件后,我能够通过设置环境变量并重新安装来解决我的问题
# remove existing `pycurl` installation
pip uninstall pycurl
# export variable with your link-time ssl backend (which is openssl above)
export PYCURL_SSL_LIBRARY=openssl
# then, re-install `pycurl` with **no cache**
pip install pycurl --no-cache-dir
可能还有其他解决方案,但这对我来说非常适合virtualenv
and pip
安装。
有些人抱怨不同的错误消息nss
代替openssl
ImportError: pycurl: libcurl link-time ssl backend (nss)
(关键部分是nss
)所以你必须针对这个错误消息做一些不同的事情:
pip uninstall pycurl
pip install --no-cache-dir --compile --compile-options="--with-nss" pycurl
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)