What versions of Python will work in Windows XP?

12,805

Solution 1

I found that python 2.7.9 and python 3.4.3 are the newest versions of python that work in windows xp. I found this out through trial and error.

Solution 2

I've found a desperate guy (Daniel Pistelli) who didn't give up at the windows error dialog:

https://ntcore.com/?p=458

I like how he approaches the topic:

If we try to start any new application on XP, we’ll get an error message informing us that it is not a valid Win32 application. This happens because of some fields in the Optional Header of the Portable Executable.

[...]

Fortunately, it’s enough to adjust the fields in the executable we want to start (python.exe), there’s no need to adjust the DLLs as well. If we try run the application now, we’ll get an error message due to a missing API in kernel32. So let’s turn our attention to the imports.

And then he goes on for another 5-6 screens. To sum it up, apparently you'll have to:

  • Modify the python.exe header,
  • Run a tiny Python script to remap some DLL calls,
  • Recalculate some binary hashes,
  • Create a fake kernel32.dll with certain calls forwarded,
  • Modify python37.dll to point to this fake thing,

and then you're all set. To be honest I couldn't quite follow (let alone verify!) some of the steps but it looks legit and there are links with Daniel's half-baked solutions for the harder parts, also a lot of Python sources explained. I will definitely give this thing a try.

In fact, here are the final scripts from his GitHub page: https://github.com/dpistelli/xptmrt

Moral of the story: you can be crazy, but you'll never be dismantle-all-dlls-and-exes-and-open-hexeditors-and-disassemble-hashing-algorithms-and-mock-it-all-together-so-it-works-under-xp-crazy!

Solution 3

Someone had built Python 3.4.10, which is slightly newer than the officially prescribed Python3 v3.4.3/3.4.4 for Windows XP. Since it comes from the third-party (not the official Python website), use at your own risk,

-->Download<--

Share:
12,805

Related videos on Youtube

Fake Name
Author by

Fake Name

By day: nothing By night: nothing By day: nothing By night: nothing By day: nothing By night: nothing By day: nothing By night: nothing By day: NOTHING By night: NOTHING

Updated on September 19, 2022

Comments

  • Fake Name
    Fake Name over 1 year

    I would like the most advanced version of Python that still works on Windows XP. I need both Python 2 and Python 3.

    What versions of Python will work on Windows XP?

  • Fake Name
    Fake Name over 6 years
    The newest versions of python will not install themselves. They are saying "for earlier versions of windows.
  • dkellner
    dkellner over 5 years
    Definitely NOT any of them. For newer versions, XP says python.exe is "not a valid application".
  • dkellner
    dkellner about 3 years
    Ah!... There's that :) Okay, never found the goddamn thing, thanks for the link!
  • mirh
    mirh about 3 years
    Links are down now, though. You can find a mirror here.
  • user2959760
    user2959760 over 2 years