PyCrypto not fully installed on Windows XP

jay picture jay · Nov 6, 2009 · Viewed 55.2k times · Source

I ran python setup.py install in a Windows XP console, and it reported as follows:

running install
running build
running build_py
running build_ext
warning: GMP library not found; Not building Crypto.PublicKey._fastmath.
building 'Crypto.Random.OSRNG.winrandom' extension
error: None

When I try to run a script with import Crypto.Cipher.AES, it doesn't work, saying:

ImportError: cannot import name AES

How can I fix this?

Answer

John Paulett picture John Paulett · Nov 6, 2009

On windows, it may just be easier installing PyCrypto via a prebuilt windows installer. The Voidspace site has PyCrypto 2.1 and 2.3 installers for Python 2.2-2.7.