来自lxml import etree ImportError undefined symbol:xmlBufContent

时间:2016-01-05 07:18:41

标签: python centos lxml

安装lxml 3.4.4后,当import lxml一切正常,但from lxml import etree无法正常工作时,错误是:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: /usr/local/lib/python2.7/site-packages/lxml-3.4.4-py2.7-linux-x86_64.egg/lxml/etree.so: undefined symbol: xmlBufContent

python版本是centos6.5上的python2.7.3。但是当我使用python2.6.6时,from lxml import etree工作正常。我不知道为什么。

顺便说一句,我尝试使用easy_install lxml,它显示:

Searching for lxml
Best match: lxml 3.4.4
Processing lxml-3.4.4-py2.7-linux-x86_64.egg
lxml 3.4.4 is already the active version in easy-install.pth

Using /usr/local/lib/python2.7/site-packages/lxml-3.4.4-py2.7-linux-x86_64.egg
Processing dependencies for lxml
Finished processing dependencies for lxml

有人可以帮忙吗?

0 个答案:

没有答案