#74 Cannot build pywin32 on Vista using VC++ Express Edition

Vernon Cole

I always try to use only free stuff -- especially if I have to buy things from Micro$oft -- so, just as an experiment, I attempted to build pywin32 (current CVS as of 2009-06-05) using the current free compiler on my Vista laptop. It worked much better than I expected, but setup.py finally crashed with:
v v v v v
Microsoft Windows [Version 6.0.6002]
C:\pywin32>c:\python26\python.exe setup.py build
Building pywin32
running build
running build_py
running build_ext
Found version 0x600 in C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\SDK
building 'perfmondata' extension
mc.exe -h win32\src\perfmon -r build\temp.win32-2.6\Release\win32\src\perfmon wi
error: command 'mc.exe' failed: No such file or directory

^ ^ ^ ^ ^
Vista Home Basic with SP2
CPython 2.6.2
Microsoft Visual C++ 2008 Express Edition with SP1 - ENU
Microsoft Visual C++ 2008 Redistributable - x86 9.0.30729
Microsoft Windows SDK for Visual Studio 2008 Headers and Libraries
Microsoft Windows SDK for Visual Studio 2008 SP1 Express Tools for .NET Framework - enu
Microsoft Windows SDK for Visual Studio 2008 SP1 Express Tools for Win32
Vernon Cole


  • Mark Hammond

    Mark Hammond - 2010-08-30

    Moving to feature requests - there is no patch attached - was that the intent?

  • Vernon Cole

    Vernon Cole - 2010-08-30

    Yes, that change would be appropriate. I tried, in vain, to find a redistributable copy of 'mc.exe'. I don't know enough about the build process to know whether in can be eliminated, worked around, or replaced.

  • native_api

    native_api - 2011-04-01

    mc.exe is missing from SDK that comes with VS 2008 (M$ support ticket on the issue - http://connect.microsoft.com/VisualStudio/feedback/details/374833/mc-exe-is-missing-in-the-visual-studio-2008-express-sdk )

    They added it to the next release, VS2010.

    It's also present in the standalone WSDK package for Windows 7, compatible with VS 2008 (http://www.microsoft.com/downloads/en/details.aspx?FamilyID=c17ba869-9671-4330-a63e-1fd44e0e2505), item "win32 development tools".

    Running setup.py from withing SDK cmd shell is enough to find mc.exe

  • native_api

    native_api - 2011-04-01

    Install the standalone SDK (components: headers, libraries for <your arch>, compilers, win32 development tools) _after_ VS2008 and you are good to go.

    ( I checked that build 216 is compiled ok in this environment. MFC-related extensions weren't built cuz MFC headers and libraries are only available in paid editions of VS )

    Building for x64 python may require a patch for distutils since vcvarsall.bat in vs2008 Express produces a broken environment in this case. The patch, vcvars4.diff , is available at http://bugs.python.org/issue7511

    The resolution to this ticket should thus be the inclusion of the 1st two paragraphs of this comment into compilation readme.


Log in to post a comment.