Jack Ha Jack Ha - 1 year ago 148
Python Question

How to install python-lxml on SLES 11, 64 bit?

For a customer I have to install a django webserver on SUSE Linux Enterprise Server 11, 64 bit (short: SLES 11).

When I add repositories from http://software.opensuse.org I can install python-lxml:

sudo zypper install python-lxml

The result is that the site-packages are installed in /usr/lib/python2.6/site-packages. However when I try to use the package, the import crashes:

$ cd /usr/lib/python2.6/site-packages
$ python2.6
>>> import lxml.etree
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: lxml/etree.so: wrong ELF class: ELFCLASS32

How to properly install the python-lxml package on SLES 11?

Answer Source

Add the SDK disk as an additional repo: SLE-11-SDK-DVD-x86_64-GM-Media1.iso. The python-lxml package on this disk works fine!