i have an error when executing “from lxml import etree” in the python command line after successfully installed lxml by pip

て烟熏妆下的殇ゞ 提交于 2019-12-05 21:39:09
brechin

See also get errors when import lxml.etree to python

I think the key error here is this:

ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/lxml/etree.so, 2): Symbol not found: _exsltDateXpathCtxtRegister

I found another person with the same problem on an lxml dev list.

Their suggestion:

You probably need to check your libxml/libxslt libraries. Make sure you have the versions required in the lxml installation instructions

Start by running

ldd /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/lxml/etree.so

That will show if you have any unresolved shared libraries. You may need to install/update some packages.

Check the thread linked above for more troubleshooting tips.

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