Error importing lxml package python in Ubuntu

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)

1

1 Answer

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.

0

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like