I am currently trying to install pycrypto and when I execute python setup.py build I receive this following error:
cc -bundle -undefined dynamic_lookup -arch
I ran into the same issue and was able to fix it by installing gmp:
brew install gmp
Then I nuked my build directory and started over with the pycrypto install and it succeeded.
This also fixes the warning message during pycrypto's configure script:
warning: GMP or MPIR library not found; Not building Crypto.PublickKey._fastmath
See related question.
For installation of PyCrypto use MacPorts and following command. I tested it on the newest version of Mac OS X - Yosemite:
Python Version 2.7:
sudo port install py27-crypto
Python Version 3.4:
sudo port install py34-crypto
Install homebrew (single line for installation at bottom of page), then try:
$ sudo pip install pycrypto
If I'm not mistaken, pip and homebrew are both package managers, but homebrew is built on ruby and pip is built on python.
$ sudo pip install pycrypto
This command you referred to needs pip installed, not homebrew.
This way to get pip
This did it for me:
sudo port install gmp
sudo ln -s /opt/local/lib/libgmp.dylib /usr/lib/libgmp.dylib
ARCHFLAGS=-Wno-error CFLAGS=-I/opt/local/include sudo -E pip install pycrypto
To install pycrypto run the following command
$ CFLAGS=-I/usr/local/include LDFLAGS=-L/usr/local/Cellar/gmp/6.1.2_2/lib pip install pycrypto