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

后端 未结 2 957
时光取名叫无心
时光取名叫无心 2020-12-02 16:06

I am attempting to install pycrypto (version 2.3) on OS X via pip. I am getting a \"Broken pipe\" error when the compiler attempts to compile MD2.c. I get a very similar e

2条回答
  •  执笔经年
    2020-12-02 16:13

    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.

提交回复
热议问题