0

When I try importing lxml package in python I am receiving the following error.

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/dist-packages/lxml/html/__init__.py", line 42, in    <module>
   from lxml import etree
ImportError: /usr/lib/python2.7/dist-packages/lxml/etree.so: undefined symbol:   PyUnicodeUCS4_DecodeLatin1

Please help to fix this.
(Python version ->2.7.5)

ZodEnIX
  • 143
  • 1
  • 1
  • 7

1 Answers1

0

According to your answer to a different question, you have a python interpreter in /usr/local/bin.

As musher pointed out it could not have been compiled to support ucs4. Try with the version installed in /usr/bin instead.