Error installing lxml on Mac Snow Leopard 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.
There is a workaround here: https://bugs.launchpad.net/lxml/+bug/790518


  export ARCHFLAGS="-arch i386 -arch x86_64"