LinMinquan's Blog

Experience technology to change life

install PyCrypto on Windows

Environment: Python 2.7

My default python environment is python 3.4, and I create a Virtualenv of python 2.7, when I try to install PyCrypto, it return some error.

warning: GMP or MPIR library not found; Not building Crypto.PublicKey._fastmath.
building 'Crypto.Random.OSRNG.winrandom' extension
error: Microsoft Visual C++ 10.0 is required. Get it with "Microsoft Windows SDK 7.1": www.microsoft.com/download/details.aspx?id=8279

I google and get a answer, I need to install prebuild binaries of PyCrypto, below is the page with those binaries for windows

http://www.voidspace.org.uk/python/modules.shtml#pycrypto

what I learned is to install in virtualenv

easy_install http://www.voidspace.org.uk/python/pycrypto-2.6.1/pycrypto-2.6.1.win32-py2.7.exe

 

Reference: https://stackoverflow.com/questions/11405549/how-do-i-install-pycrypto-on-windows


Share