How to install pywin32 module in windows 7

narayanpatra picture narayanpatra · Feb 1, 2011 · Viewed 170.2k times · Source

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.

Answer

Kanguros picture Kanguros · Jan 25, 2016

You can install pywin32 wheel packages from PYPI with PIP by pointing to this package: https://pypi.python.org/pypi/pypiwin32 No need to worry about first downloading the package, just use pip:

pip install pypiwin32

Currently I think this is "the easiest" way to get in working :) Hope this helps.