I am using Ubuntu 12.04.2 LTS. I have used libxml2 in my python script and when I try to run it, gives error
Traceback (most recent call last):
File "deploy.py", line 3, in <module>
import libxml2
ImportError: No module named libxml2
I tried almost all stackoverflow answers for the same question but nothings solves the issue (Installed several different packages).
You have to install the package in Ubuntu before being able to use it:
sudo apt-get install python-libxml2
You'd have to install python-libxml2
.
Note that that's a fairly basic wrapper around the libxml2
C library. You may want to use lxml
instead, for a far more Pythonic XML API.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With