You are probably looking for something like lxml.
Please have a look at the lxml webpage
You can install it in ubuntu with
sudo apt-get install python-lxml
Answer from martin on askubuntu.com
» pip install elementpath
Videos
» pip install pycopy-xml.etree.ElementTree
There is no python-xml package in the repository. What made you decide you need a package with that specific name? Are you looking for python-lxml instead? This is the common Python XML library that I believe most people use.
You are trying to install the pyhrf project which depends of PyXML, but PyXML is dead, and wont work on Python 2.6 or newer. I would recommend to look for another project similar to pyhrf.
Since you're on Ubuntu, don't bother with those source packages. Just install those development packages using apt-get.
apt-get install libxml2-dev libxslt1-dev python-dev
If you're happy with a possibly older version of lxml altogether though, you could try
apt-get install python-lxml
and be done with it. :)
I also had to install lib32z1-dev before lxml would compile (Ubuntu 13.04 x64).
sudo apt-get install lib32z1-dev
Or all the required packages together:
sudo apt-get install libxml2-dev libxslt-dev python-dev lib32z1-dev
» pip install elementtree
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 albertov's answer will help. But unless there is a reason, don't, just install it from the repository.
I solved it upgrading the lxml version with:
pip install --upgrade lxml