libxml2.2.dylib reference in python program

自古美人都是妖i 提交于 2019-12-10 01:58:49

问题


A python library that I'm using uses libxml2.2.dylib. I'm getting this error message:

Reason:

Incompatible library version: etree.so requires version 12.0.0 or later, but libxml2.2.dylib provides version 10.0.0

My system's version of libxml2.2.dylib is older and is in /usr/lib/. I downloaded the newest version of libxml2.2.dylib using homebrew, and that is in /usr/local/Cellar/libxml2/2.9.1/lib/.

I would like my Python application to use that version instead of the one the system uses.

Is this a matter of adding the homebrew folder to the path?


回答1:


Try to follow the instructions here to build lxml with static dependencies. This way you don't have to worry about which version of libxml2 or libxslt it is linked against.

It could boil down to

STATIC_DEPS=true pip install -U lxml


来源:https://stackoverflow.com/questions/18486145/libxml2-2-dylib-reference-in-python-program

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!