2010-07-16 6 views
0

J'essaie d'installer lxml, sur un serveur Ubuntu exécutant Python 2.6 (dans un virtualenv - le système Python est 2.5).Erreur lors de la construction de l'extension 'lxml.etree'

J'ai vérifié via svn et par conséquent j'ai également installé Cython, as per the instructions.

Cependant, je reçois l'erreur suivante lors de l'exécution python setup.py build:

Building lxml version 2.3.alpha1-76211. 
Building with Cython 0.11. 
Using build configuration of libxslt 1.1.22 
Building against libxml2/libxslt in the following directory: /usr/lib 
running build 
running build_py 
running build_ext 
cythoning src/lxml/lxml.etree.pyx to src/lxml/lxml.etree.c 

Error converting Pyrex file to C: 
------------------------------------------------------------ 
... 
     c_child = _findChildForwards(c_node, 0) 
     while c_child is not NULL: 
      if c_child.type == tree.XML_ELEMENT_NODE: 
       for i in range(c_tag_count): 
        if _tagMatchesExactly(c_child, c_ns_tags[2*i], c_ns_tags[2*i+1]): 
         c_next = _findChildForwards(c_child, 0) or _nextElement(c_child) 
                  ^
------------------------------------------------------------ 

/home/admin/web/blink/lxml/src/lxml/cleanup.pxi:246:64: Cannot assign type 'int' to 'xmlNode *' 

Error converting Pyrex file to C: 


building 'lxml.etree' extension 
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/usr/include/libxml2 -I/home/admin/python/2.6.5/include/python2.6 -c src/lxml/lxml.etree.c -o build/temp.linux-x86_64-2.6/src/lxml/lxml.etree.o -w 
src/lxml/lxml.etree.c:1:2: error: #error Do not use this file, it is the result of a failed Cython compilation. 
error: command 'gcc' failed with exit status 1 

Et des erreurs très similaires si je tente python setup.py bdist_egg, python setup.py build_ext -i ou make

Essayer d'installer via easy_install ou pip produit la même erreur - bien que le premier reste suspendu indéfiniment. Pour autant que je sache, toutes les dépendances, telles que python-dev, sont installées.

Qu'est-ce que je manque/fais mal?

Répondre

1

"J'ai vérifié via svn " ...

"Building lxml version 2.3. alpha1 -76211" ...

Vous semblez être sur le bord de saignement. Suggestions: utilisez une version publiée de la source lxml. Consultez l'auteur/mainteneur lxml.

+0

* béquille le front * - merci pour la dose de bon sens. lxml 2.2.6 installé depuis tarball via 'python setup.py install' travaillé. –

Questions connexes