I had the same problem on my Mac when installing with pip
. I then removed pycrypto
and installed it again with easy_install
, like this:
pip uninstall pycrypto
easy_install pycrypto
also as Luke commented: If you have trouble running these commands, be sure to run them as admin (sudo)
Hope this helps!
EDIT: As winklerr correctly notes above, pycrypto is no longer safe. Use pycryptodome instead, it is a drop-in replacement