Search code examples
pythonccompiler-constructionmingwpywin32

How to install pywin32 module in windows 7


I am trying to install pywin32. I downloaded it from sourceforge.net. When I run

setup.py install

it shows "Unable to find vcvarsall.bat". I Googled about it and found that I have to install MinGW and set path then run

python setup.py build --compiler=mingw32

but it's showing

Can't find a version in Windows.h

Can anybody help? (I have a trial version of Visual Studio 2010 Ultimate installed and MinGW C and C++ compiler installed. Operating system: Windows 7.)

Can anybody tell me a source from where I can download Python binaries already compiled in MinGW, so I don't have to do all this. Or if I can get a python which already have Windows modules.


Solution

  • are you just trying to install it, or are you looking to build from source?

    If you just need to install, the easiest way is to use the MSI installers provided here:

    http://sourceforge.net/projects/pywin32/files/pywin32/ (for updated versions)

    make sure you get the correct version (matches Python version, 32bit/64bit, etc)