且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

“未定义符号:__xmlStructuredErrorContext";从lxml导入etree

更新时间:2023-11-10 19:25:34

您的lxml.etree版本是针对与实际安装的版本不同的libxml2版本编译的.重新安装libxml2并没有帮助,因为您只是重新安装了相同的代码.重新安装捆绑现有etree.cpython-34m.so二进制文件的二进制文件也不起作用,因为该二进制文件本身是固有损坏的(

Your version of lxml.etree was compiled against a different version of libxml2 than the one you have actually installed. Reinstalling libxml2 doesn't help because you're just reinstalling the same code. Reinstalling the binaries that bundle your existing etree.cpython-34m.so binary won't work either, because that binary itself is inherently broken (it refers to a symbol that isn't exported in all versions of libxml2).

卸载Python模块(不是C库),然后从源代码重新安装. (pip应该能够自动执行此操作,前提是您已经安装了libxml2和libxslt的-devel头文件以及适当的编译器.)

Uninstall the Python module -- not the C library -- and reinstall it from source. (pip should be able to do this automatically, assuming that you have -devel headers for libxml2 and libxslt installed and an appropriate compiler).