当我在python接口中导入curl时,它显示错误
ImportError: pycurl: libcurl link-time version (7.37.1) is older than compile-time version (7.43.0).
怎么解决?我的系统是优胜美地.
解决方法:
我在Sierra遇到了这个错误.感谢seeliuh在这个issue的帖子,我做了以下修复:
1.uninstall pycurl.
pip uninstall pycurl
2.export LD_LIBRARY_PATH =<< your homebrew的libcurl path>>
export LD_LIBRARY_PATH=/usr/local/opt/curl/lib
export LIBRARY_PATH=/usr/local/opt/curl/lib
3.reinstall 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的版本应该比编译时版本大.请检查一下.)