Coldblackice Coldblackice - 1 year ago 496
Python Question

How do I install PyCrypto on Windows?

I've read every other google source and SO thread, with nothing working.

Python 2.7.3 32bit
installed on
Windows 7 64bit
. Download, extracting, and then trying to install PyCrypto results in
"Unable to find vcvarsall.bat".

So I install MinGW and tack that on the install line as the compiler of choice. But then I get the error
"RuntimeError: chmod error".

How in the world do I get around this? I've tried using pip, which gives the same result. I found a prebuilt PyCrypto 2.3 binary and installed that, but it's nowhere to be found on the system (not working).

Any ideas?

Answer Source

If you don't already have a C/C++ development environment installed that is compatible with the Visual Studio binaries distributed by, then you should stick to installing only pure Python packages or packages for which a Windows binary is available.

Fortunately, there are PyCrypto binaries available for Windows:

As @Udi suggests in the comment below, the following command also installs pycrypto and can be used in virtualenv as well:


Notice to choose the relevant link for your setup from this list

If you're looking for builds for Python 3.5, see PyCrypto on python 3.5

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download