para mac how descargar python macos gcc pip pycrypto

how - python 3.7 install mac



Error de Broken Pipe al usar pip para instalar Pycrypto en Mac OS X (2)

Estoy intentando instalar Pycrypto (versión 2.3) en OS X a través de pip. Obtengo un error de "conexión interrumpida" cuando el compilador intenta compilar MD2.c. Aparece un error muy similar cuando uso easy_install.

Aquí está el error que estoy recibiendo:

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$

Intenté instalar este paquete usando puertos mac con el comando "sudo port install py26-crypto", y parece que se instalará sin problemas, pero luego me dice que el paquete pycrypto falta al ejecutar el comando "fab" (Fabric).

Intenté usar el comando "ARCHFLAGS" recomendado en respuesta por YH Wong aquí, pero no tuve suerte: https://superuser.com/questions/259278/python-2-6-1-pycrypto-2-3-pypi-package-broken-pipe-during-build

Estoy usando Mac OS X 10.6.7 con Python 2.6.6 y XCode está instalado.


Si ha instalado Xcode 4, intente configurar ARCHFLAGS antes de llamar a pip o easy_install :

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

El problema es que Xcode 4 ha eliminado el soporte para -arch ppc pero el sistema Python 2.6 en Mac OS X 10.6 espera construir módulos de extensión universales C con las tres arquitecturas. Y si define la variable de entorno antes del comando sudo, probablemente no se exportará al entorno sudo.


Xcode 5.1

ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future pip2.7 install pycrypto