gpt4 book ai didi

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

转载 作者:太空宇宙 更新时间:2023-11-03 14:11:13 24 4
gpt4 key购买 nike

当我在 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/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com