Installing lxml module in python

Installing lxml module in python

Just do:

sudo apt-get install python-lxml

For Python 2 (e.g., required by Inkscape):

sudo apt-get install python2-lxml

If you are planning to install from source, then albertovs answer will help. But unless there is a reason, dont, just install it from the repository.

I solved it upgrading the lxml version with:

pip install --upgrade lxml

Installing lxml module in python

You need to install Pythons header files (python-dev package in debian/ubuntu) to compile lxml. As well as libxml2, libxslt, libxml2-dev, and libxslt-dev:

apt-get install python-dev libxml2 libxml2-dev libxslt-dev

Leave a Reply

Your email address will not be published.