python - MAC OS ImportError : pycurl: libcurl link-time version (7. 37.1) 早于编译时版本 (7.43.0)

标签 python macos pycurl

当我在 python 界面中导入 curl 时,它显示错误

ImportError: pycurl: libcurl link-time version (7.37.1) is older than compile-time version (7.43.0).

如何解决?我的系统是优胜美地。

最佳答案

我在 Sierra 上遇到了这个错误。感谢 seeliuh 在此 issue 中的帖子,我在做完之后修复了它:

1.卸载pycurl。

pip uninstall pycurl

2.export LD_LIBRARY_PATH= <<your homebrew's libcurl path>>

export LD_LIBRARY_PATH=/usr/local/opt/curl/lib

export LIBRARY_PATH=/usr/local/opt/curl/lib

3.重新安装pycurl

easy_install pycurl # you also can try to use pip though using it here probably would cause some problems

注意:

PycURL documentation指出:

If libcurl is linked dynamically with pycurl, you may have to alter the LD_LIBRARY_PATH environment variable accordingly. This normally applies only if there is more than one version of libcurl installed, e.g. one in /usr/lib and one in /usr/local/lib.

因此,您应该更改您的 LD_LIBRARY_PATH进入你的自制程序的 libcurl 路径。 (你的自制程序的 libcurl 版本应该比编译时版本大。请检查。)

关于python - MAC OS ImportError : pycurl: libcurl link-time version (7. 37.1) 早于编译时版本 (7.43.0),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37812070/

相关文章:

python - 为output_server()指定doc-id和plot-id(即URL)

python - MySQL + Python :Using auto increment primary key

macos - NSImage TIFFRepresentation 未随 ARC 一起发布

cocoa - CoreService 框架有关于 PBFSCopyFileSync 的详细文档或示例代码吗?

Python:使用 cURL 获取重定向 url

python - Pycurl 列表设置选项

python - 禁用鼠标单击并更改指针图标

python - 文本的感知哈希函数

swift - 在没有 Storyboard的情况下将 ViewController 添加到应用程序

python - pycurl 和 SSL 证书