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