Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I tried many times but still can not figure out how to install lxml into python 3.2

I'm using mac osx 10.6.8, gcc version 4.2.1

I install lxml using the following command

python3.2 setup.py build --static-deps

I always got errors as


src/lxml/lxml.etree.c: In function ‘__Pyx_PyIndex_AsSsize_t’:
src/lxml/lxml.etree.c:161563: error: ‘x’ undeclared (first use in this function)
src/lxml/lxml.etree.c:161563: error: ‘b’ undeclared (first use in this function)
src/lxml/lxml.etree.c:161565: error: invalid lvalue in assignment
src/lxml/lxml.etree.c:161566: error: syntax error before ‘)’ token
src/lxml/lxml.etree.c:161566: error: syntax error before ‘)’ token
src/lxml/lxml.etree.c:161566: error: syntax error before ‘)’ token
src/lxml/lxml.etree.c:161566: error: syntax error before ‘)’ token
src/lxml/lxml.etree.c:161566: error: syntax error before ‘)’ token
src/lxml/lxml.etree.c: At top level:
src/lxml/lxml.etree.c:161570: error: syntax error before ‘*’ token
src/lxml/lxml.etree.c:161570: error: syntax error before ‘ival’
src/lxml/lxml.etree.c: In function ‘__Pyx_PyInt_FromSize_t’:
src/lxml/lxml.etree.c:161580: error: ‘ival’ undeclared (first use in this function)
src/lxml/lxml.etree.c: At top level:
src/lxml/lxml.etree.c:161584: error: syntax error before ‘__Pyx_PyInt_AsSize_t’
src/lxml/lxml.etree.c:161584: error: syntax error before ‘*’ token
src/lxml/lxml.etree.c: In function ‘__Pyx_PyInt_AsSize_t’:
src/lxml/lxml.etree.c:161585: error: ‘x’ undeclared (first use in this function)
src/lxml/lxml.etree.c:161588: error: syntax error before ‘val’
src/lxml/lxml.etree.c:161593: error: syntax error before ‘val’
lipo: can't figure out the architecture type of: /var/folders    /3o/3ozga0d2GXy7aa8oMPgJNU+++TI/-Tmp-//ccr3DFwu.out
error: command 'gcc-4.0' failed with exit status 1

Any suggestions?

share|improve this question

migrated from stackoverflow.com Sep 22 '11 at 5:28

This question came from our site for professional and enthusiast programmers.

    
Did you try: STATIC_DEPS=true sudo easy_install --allow-hosts=lxml.de,*.python.org lxml or the instructions @ lxml.de/installation.html#installation –  Lostsoul Sep 22 '11 at 3:56
    
I tried, STATIC_DEPS=true sudo easy_install --allow-hosts=lxml.de,*.python.org lxml Password: Searching for lxml Best match: lxml 2.3 Processing lxml-2.3-py2.6-macosx-10.6-universal.egg lxml 2.3 is already the active version in easy-install.pth Using /Library/Python/2.6/site-packages/lxml-2.3-py2.6-macosx-10.6-universal.egg Processing dependencies for lxml Finished processing dependencies for lxml –  Sophia Sep 22 '11 at 4:15
    
It seems always using py2.6. I want to install into python3.2 –  Sophia Sep 22 '11 at 4:16
    
Sorry I installed it a while ago and don't want to give you a definitive answer as it was a long time ago. I do remember running into issues as well and I eventually figured it out. Check out this link, someone has simalir problems and outlines how they resolved it: codespeak.net/pipermail/lxml-dev/2010-July/005558.html –  Lostsoul Sep 22 '11 at 5:18
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.