I have a problem when I try to execute:
myuser@my-pc:~$ python
Python 2.7.6 (default, Mar 22 2014, 22:59:56)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import libxml2
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named libxml2
I have installed python-dev libxml2 libxml2-dev libxslt-dev packages since I found on the internet a lot of such advices about these packages for my problem, but no result.
At the same time on my ubuntu desktop without any changes I can successfully do 'import libxml2' using python2.7 command line
Could you please advise how to fix this issue?
libxml2is not a Python package. Why are you trying to import it as such? What are you trying to do?lxmllibrary instead? These days, there are also Ubuntu packages forlxml.lxmlis a Python library that useslibxml2to parse XML documents.libxml2Ubuntu package installs the shared object library; it is not a Python module. If your other PC has a Python module by the same name, you'll have to copy it over, there is no published Python module by that name. However, judging by the debian packages you installed, what you are really looking for islxml.