我试图使用pip在virtualenv中安装pycurl,我收到了这个错误
ImportError: pycurl: libcurl link-time ssl backend (openssl) is different from compile-time ssl backend (none/other)
Run Code Online (Sandbox Code Playgroud)
我读了一些文档,说"为了解决这个问题,你需要告诉setup.py使用什么SSL后端" (来源),虽然我不知道怎么做,因为我用pip安装了pycurl.
使用pip安装pycurl时如何指定SSL后端?
谢谢
我在 Windows 计算机上安装 pycurl 时遇到问题。起初我尝试了 pip,但遇到了“请指定 --curl-dir=/path/to/built/libcurl”错误,并且在再次运行之前尝试安装 curl。
我从http://curl.haxx.se/download.html下载了 curl并将其解压缩到它自己的文件夹中。
我尝试了以下方法:
D:\Downloads\pycurl-7.19.5.1\pycurl-7.19.5.1>python setup.py install --curl-dir="D:\Downloads\curl-7.40.0\curl-7.40.0"
Run Code Online (Sandbox Code Playgroud)
但收到以下错误。
Using curl directory: D:\Downloads\curl-7.40.0\curl-7.40.0
libcurl.lib does not exist at D:\Downloads\curl-7.40.0\curl-7.40.0\lib\libcurl.lib.
Curl directory must point to compiled libcurl (bin/include/lib subdirectories):
Run Code Online (Sandbox Code Playgroud)
我找不到它要找的这个 libcurl.lib 文件。
任何帮助,将不胜感激。
更新:
从同一网站重新下载了一个新库 curl-7.40.0-win64,其中包含一个 libcurl.lib 文件。
D:\Downloads\pycurl-7.19.5.1\pycurl-7.19.5.1>python setup.py install --curl-dir=
"D:\Downloads\curl-7.40.0-win64\curl-7.40.0-win64\"
Curl directory does not exist: D:\Downloads\curl-7.40.0-win64\curl-7.40.0-win64"
D:\Downloads\pycurl-7.19.5.1\pycurl-7.19.5.1>python setup.py install --curl-dir=
"D:\Downloads\curl-7.40.0-win64\curl-7.40.0-win64\lib"
Using curl directory: D:\Downloads\curl-7.40.0-win64\curl-7.40.0-win64\lib
libcurl.lib does not exist at D:\Downloads\curl-7.40.0-win64\curl-7.40.0-win64\l
ib\lib\libcurl.lib.
Curl directory must point to compiled libcurl …Run Code Online (Sandbox Code Playgroud) 我正在尝试在 MacOS Sierra 上的 venv 中安装 pycurl。我已经清理干净,通过 brew 安装了 openssl,告诉 pip 链接到该 openssl 安装并尝试加载模块。它抱怨“无/其他”与“openssl”不同。
ImportError: pycurl: libcurl link-time ssl backend (none/other) is different from compile-time ssl backend (openssl)
Run Code Online (Sandbox Code Playgroud)
该包似乎已按预期编译,但它正在尝试加载错误的 ssl 库。关于解决这个问题的任何建议?我在谷歌搜索后尝试过谷歌搜索。
完整安装尝试:
(venv) R5106464:venv m106093$ brew uninstall openssl
Error: No such keg: /usr/local/Cellar/openssl
(venv) R5106464:venv m106093$ pip uninstall pycurl
Skipping pycurl as it is not installed.
(venv) R5106464:venv m106093$ brew install openssl
==> Downloading https://homebrew.bintray.com/bottles/openssl-1.0.2q.sierra.bottl
Already downloaded: /Users/m106093/Library/Caches/Homebrew/downloads/b6dec2b57ee88a3cb02335284971b3b1e902d8b43fef115b456a971e5d0981ce--openssl-1.0.2q.sierra.bottle.tar.gz
==> Pouring openssl-1.0.2q.sierra.bottle.tar.gz
==> Caveats
A CA file has been bootstrapped using …Run Code Online (Sandbox Code Playgroud)