Broken Pipe error when using pip to install pycrypto on Mac OS X

If you have installed Xcode 4, try setting ARCHFLAGS before calling pip or easy_install:

sudo bash
export ARCHFLAGS='-arch i386 -arch x86_64'
pip ...

The problem is that Xcode 4 has removed support for -arch ppc but the system Python 2.6 on Mac OS X 10.6 expects to build universal C extension modules with all three architectures. And if you define the environment variable prior to the sudo command, it will likely not be exported through to the sudo environment.

Leave a Comment