python.exe is not a valid win32 executable

Gisle Vanem gvanem at yahoo.no
Thu Oct 29 14:21:14 EDT 2015


Mark Lawrence wrote:

> CPython's Windows support now follows this lifecycle. A new feature
> release X.Y.0 will support all Windows releases whose extended support
> phase is not yet expired. Subsequent bug fix releases will support the
> same Windows releases as the original feature release (even if the
> extended support phase has ended).

The reason for error message the OP reported is what
the MSVC 2015 (?) linker puts in the PE optional header.
 From 'pedump python3.exe':

Optional Header
   Magic                         010B
   linker version                14.00
   ...
   file align                    200
   required OS version           6.00   << !!

Hence the error on Win-XP (i.e. 5.x).

Wouldn't it be more elegant of Python (and it's installer)
to put a '-subsystem:console,5.02' in the link flags?
And then detect Win-XP later on and refuse a further install?

-- 
--gv



More information about the Python-list mailing list