15

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?

TAbdiukov
  • 1,185
  • 3
  • 12
  • 25
Fake Name
  • 359
  • 1
  • 3
  • 14

7 Answers7

16

I found that Python 2.7.9 and Python 3.4.4 are the newest versions of Python that work in Windows XP. I found this out through trial and error.

phoenix
  • 7,988
  • 6
  • 39
  • 45
Fake Name
  • 359
  • 1
  • 3
  • 14
4

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!

dkellner
  • 8,726
  • 2
  • 49
  • 47
  • Ah!... There's that :) Okay, never found the goddamn thing, thanks for the link! – dkellner Feb 02 '21 at 22:09
  • Links are down now, though. You can find a mirror [here](https://retrosystemsrevival.blogspot.com/2021/01/python-371-for-windows-xp.html). – mirh Feb 03 '21 at 13:58
2

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<--

TAbdiukov
  • 1,185
  • 3
  • 12
  • 25
1

There are several custom builds of Python >3.44 suitable for Windows XP. A poster at reddit has provided Python 3.55 here: https://www.reddit.com/r/Python/comments/3tgi0t/python_35_x86_on_windows_xp/

Here is an XP compatible build of 3.6.15 source code only: https://alex-free.github.io/winxp_python3.6.15/

At the MSFN forums someone has provided an XP compatible build of 3.8.1350 here: https://msfn.org/board/topic/183741-python-3813-for-windows-xp-sp3/

Pherospeni
  • 11
  • 2
  • Repository with Python 3.6.15 does not exist more on Github. It's another one repository about Windows XP that is 404. – Paul K. Feb 05 '23 at 20:09
  • 1
    I have archived the source code for winxp_python3.6.15 which you can obtain as a direct download here: https://www.4shared.com/web/directDownload/6RcG43e5ge/B8-gUmU2.9465088ff59eba7b446e4be4142944c2. I intend to compile it under Cygwin as recommended although I am sceptical that Python can be compiled with mingw32. – Pherospeni Apr 23 '23 at 07:48
0

i tried 3.3.3 but i came up with an error message use 3.4.3/2.7.9 they are the only versions that work now sadly

0

Official website says about 3.4.10: https://www.python.org/downloads/release/python-3410/

Paul K.
  • 79
  • 1
  • 11
-3

Any of them, python is very platform independent. Some features might not work, but that would best be found in the documentation.

mcchucklezz
  • 376
  • 1
  • 16
  • 1
    The newest versions of python will not install themselves. They are saying "for earlier versions of windows. – Fake Name Dec 04 '17 at 18:02
  • Definitely NOT any of them. For newer versions, XP says python.exe is "not a valid application". – dkellner Aug 25 '18 at 06:33