Menu

#519 install with mingw issue

closed
nobody
5
2014-08-16
2010-11-12
No

I try installing pywin32-214 on a winXP-SP3 machine.
No visual studio 2003 installed.
setup.py install stops with the following error:

error: Python was built with Visual Studio 2003;
extensions must be built with a compiler than can generate compatible binaries.
Visual Studio 2003 was not found on this system. If you have Cygwin installed,
you can try compiling with MingW32, by passing "-c mingw32" to setup.py.

Since I have mingw installed I tried:

setup.py build -c mingw32

The result is:
Building pywin32 2.5.214.0
running build
running build_py
running build_ext
Traceback (most recent call last):
File "setup.py", line 2152, in <module>
('', ('pywin32.pth',)),
File "C:\Program\python25\lib\distutils\core.py", line 151, in setup
dist.run_commands()
File "C:\Program\python25\lib\distutils\dist.py", line 974, in run_commands
self.run_command(cmd)
File "C:\Program\python25\lib\distutils\dist.py", line 994, in run_command
cmd_obj.run()
File "setup.py", line 596, in run
build.run(self)
File "C:\Program\python25\lib\distutils\command\build.py", line 112, in run
self.run_command(cmd_name)
File "C:\Program\python25\lib\distutils\cmd.py", line 333, in run_command
self.distribution.run_command(command)
File "C:\Program\python25\lib\distutils\dist.py", line 994, in run_command
cmd_obj.run()
File "C:\Program\python25\lib\distutils\command\build_ext.py", line 290, in ru
n
self.build_extensions()
File "setup.py", line 872, in build_extensions
self.build_extension(ext)
File "setup.py", line 1065, in build_extension
why = self._why_cant_build_extension(ext)
File "setup.py", line 760, in _why_cant_build_extension
raise RuntimeError("Can't find a version in Windows.h")
RuntimeError: Can't find a version in Windows.h

I tried to define WINVER and _WIN32_WINNT in c:\MinGw\include\Windows.h, to 0x0502, but it did not help.
I read somewhere that there were a binary that can be used, but couldn't find it.

Discussion

  • Mark Hammond

    Mark Hammond - 2010-11-13

    MingGW isn't supported and I've never even tried to use it for this - so you can expect some problems - but I will accept any patches you can make to fix it.

    This particular problem can probably be moved on from by setting the env var MSSDK=c:\mingw - but as mentioned, I expect other problems will follow and you will probably need to determine those problems yourself.

     
  • Mark Hammond

    Mark Hammond - 2010-11-13
    • status: open --> pending
     
  • Mark Hammond

    Mark Hammond - 2010-11-13

    Oops - rereading I was wrong - the env var will not fix this issue. You will need to dig into setup.py to see how to make the version declarations match.

     
  • SourceForge Robot

    This Tracker item was closed automatically by the system. It was
    previously set to a Pending status, and the original submitter
    did not respond within 14 days (the time period specified by
    the administrator of this Tracker).

     
  • SourceForge Robot

    • status: pending --> closed
     
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.