Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I am getting what seems to be a common error when trying to install lxml on MacOS 10.6:

Building lxml version 2.3.
Building without Cython.
Using build configuration of libxslt 1.1.24
/usr/libexec/gcc/powerpc-apple-darwin10/4.2.1/as: assembler (/usr/bin/../libexec/gcc/darwin/ppc/as or /usr/bin/../local/libexec/gcc/darwin/ppc/as) for architecture ppc not installed
Installed assemblers are:
/usr/bin/../libexec/gcc/darwin/x86_64/as for architecture x86_64
/usr/bin/../libexec/gcc/darwin/i386/as for architecture i386
src/lxml/lxml.etree.c:161594: fatal error: error writing to -: Broken pipe
compilation terminated.
lipo: can't open input file: /var/tmp//cc7Ypl70.out (No such file or directory)
error: Setup script exited with error: command 'gcc-4.2' failed with exit status 1

I have tried several of the suggestions I could find (setting archflags, linking to gcc-4.0) but still get the same error every time. I have Xcode 4 installed. Any help appreciated.

RESOLVED with: sudo env ARCHFLAGS="-arch i386 -arch x86_64" easy_install lxml

No thanks to the question migration. It was beter suited for StackOverflow.

share|improve this question
1  
Is this a programming question? –  Sparky672 Jun 3 '11 at 4:33
    
No, and I flagged for it to be moved. –  Dhaivat Pandya Jun 3 '11 at 5:22
    
Which python are you using? –  Mark Jun 3 '11 at 10:45
1  
Well, I'm trying to work with XML in Python. StackOVerflow was more appropriate than a Mac poweruser forum. –  pbreitenbach Jun 11 '11 at 5:52
add comment

migrated from stackoverflow.com Jun 3 '11 at 9:57

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

1 Answer

up vote 2 down vote accepted

There is a workaround here: https://bugs.launchpad.net/lxml/+bug/790518

export ARCHFLAGS="-arch i386 -arch x86_64"

share|improve this answer
1  
Thanks. That was close. What finally did it was this: sudo env ARCHFLAGS="-arch i386 -arch x86_64" easy_install lxml –  pbreitenbach Jun 11 '11 at 6:03
add comment

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.