[Python-de] lxml import Problem

Hartmut Goebel h.goebel at goebel-consult.de
Do Nov 17 10:23:35 CET 2011


Am 17.11.2011 10:04, schrieb Alexander Crössmann:
> ich hab seit kurzem ein Problem etree aus lxml zu importieren "from 
> lxml import etree". Es kommt die Fehlermeldung "ImportError: 
> libpython2.5.so.1.0: cannot open shared object file: No such file or 
> directory". lxml hab ich aus den Ubuntu (11.04) Paketquellen 
> installiert und das funktioniert auch schon ein paar Jahre. Die 
> installierte Python Version (auch aus den Paketquellen) ist 2.7.1.. 
> Python2.5 ist bei mir nicht in den Paketquellen.

Wahrscheinlich hast Du eine Version von lxml im Pfad, die noch für 
Python 2.5 gebaut ist. Schaue mal nach:

$ python
Python 2.6.5 (r265:79063, May 20 2011, 13:23:49)
[GCC 4.4.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
 >>> import inspect
 >>> import lxml
 >>> inspect.getfile(lxml)
'/usr/lib/python2.6/site-packages/lxml/__init__.pyc'
 >>>

-- 
Schönen Gruß - Regards
Hartmut Goebel
Dipl.-Informatiker (univ.), CISSP, CSSLP

Goebel Consult
Spezialist für IT-Sicherheit in komplexen Umgebungen
http://www.goebel-consult.de

Monatliche Kolumne: http://www.cissp-gefluester.de/
Goebel Consult ist Mitglied bei http://www.7-it.de



Mehr Informationen über die Mailingliste python-de