Compile PyCrypto on Windows With Visual C++

Install Visual Studio 2008 SP1 Express Edition.

Go to the command prompt.

First, I had to set the following variable:

C:>set VS90COMNTOOLS=C:Program FilesMicrosoft Visual Studio 9.0Common7Tools

Note the trailing backslash – that needs to be there. The value must also NOT be in quotes.

C:>cd "Program FilesMicrosoft Visual Studio 9.0vcbin"
C:Program FilesMicrosoft Visual Studio 9.0VCbin>vcvars32
Setting environment for using Microsoft Visual Studio 2008 x86 tools.

Then, from your PyCrypto directory, run:

python setup.py install

And it should install with no problem.

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.