简体   繁体   中英

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?

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!

You can do

pip install lxml

It might requires using sudo .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM