I tried to install libxml2
and libxslt
on ubuntu 16.04 using this command:
sudo apt-get install libxml2-dev libxslt-dev python-dev
when finished I try to import like this:
import libxml2
import libxslt
when I use python2
I can import without problem and when use python3
I get this error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named 'xmllib2'
For the first part:
sudo apt-get install python3-libxml2
For libxslt, it is no longer maintained. However, someone has ported it to work with Python3: https://github.com/Unidata/gempak/tree/master/extlibs/xslt/libxslt-1.1.28
It appears that it must be compiled. Here is the documentation stating that it works with Python3: https://gist.github.com/novocaine/ae657bdbf0f25b81e52b
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