Ошибка Broken Pipe при использовании pip для установки pycrypto в Mac OS X

Я пытаюсь установить pycrypto (версия 2.3) на OS X через pip. Я получаю сообщение об ошибке «Сломанный канал», когда компилятор пытается скомпилировать MD2.c. Я получаю очень похожую ошибку при использовании easy_install.

Вот ошибка, которую я получаю:

bash-3.2$ 
bash-3.2$ sudo pip install pycrypto
Password:
Downloading/unpacking pycrypto
  Running setup.py egg_info for package pycrypto
Installing collected packages: pycrypto
  Running setup.py install for pycrypto
    warning: GMP library not found; Not building Crypto.PublicKey._fastmath.
    building 'Crypto.Hash.MD2' extension
    gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -fwrapv -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch ppc -arch x86_64 -pipe -std=c99 -O3 -fomit-frame-pointer -Isrc/ -I/System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6 -c src/MD2.c -o build/temp.macosx-10.6-universal-2.6/src/MD2.o
    /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/MD2.c:134: fatal error: error writing to -: Broken pipe
    compilation terminated.
    lipo: can't open input file: /var/tmp//cc47qHNI.out (No such file or directory)
    error: command 'gcc-4.2' failed with exit status 1
    Complete output from command /usr/bin/python -c "import setuptools;__file__='/Users/damusin/tmp/pycrypto/pycrypto-2.3/build/pycrypto/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --single-version-externally-managed --record /tmp/pip-W6xQ61-record/install-record.txt:
    running install

running build

running build_py

running build_ext

warning: GMP library not found; Not building Crypto.PublicKey._fastmath.

building 'Crypto.Hash.MD2' extension

gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -fwrapv -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch ppc -arch x86_64 -pipe -std=c99 -O3 -fomit-frame-pointer -Isrc/ -I/System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6 -c src/MD2.c -o build/temp.macosx-10.6-universal-2.6/src/MD2.o

/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/MD2.c:134: fatal error: error writing to -: Broken pipe

compilation terminated.

lipo: can't open input file: /var/tmp//cc47qHNI.out (No such file or directory)

error: command 'gcc-4.2' failed with exit status 1

----------------------------------------
Command /usr/bin/python -c "import setuptools;__file__='/Users/damusin/tmp/pycrypto/pycrypto-2.3/build/pycrypto/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --single-version-externally-managed --record /tmp/pip-W6xQ61-record/install-record.txt failed with error code 1
Storing complete log in /Users/admin/.pip/pip.log
bash-3.2$ 
bash-3.2$ 

Я попытался установить этот пакет, используя порты Mac с помощью команды «sudo port install py26-crypto», и пытается установить плавно, но затем он сообщает мне, что пакет pycrypto отсутствует при запуске команды "fab" (Fabric).

Я попытался использовать команду "ARCHFLAGS", рекомендованную в ответе YH Wong здесь, но не повезло: https://superuser.com/questions/259278/python-2-6-1-pycrypto-2-3-pypi-package-broken-pipe-during-build

Я использую Mac OS X 10.6 .7 с установленным python 2.6.6 и XCode.

29
задан Community 20 March 2017 в 10:18
поделиться