Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What versions of Python will work in Windows XP?

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?

like image 858
Fake Name Avatar asked Nov 27 '17 17:11

Fake Name


People also ask

Which Python version can run on Windows XP?

Python 2.5 Release Windows XP and later already have MSI; many older machines will already have MSI installed. The new format installer allows for automated installation and many other shiny new features. There are also separate installers for Win64-Itanium users (on XP/2003 64-bit Itanium Edition) - Python-2.5.

Is Python supported in Windows XP?

Note that Python 3.10.8 cannot be used on Windows 7 or earlier. Note that Python 3.7.15 cannot be used on Windows XP or earlier. No files for this release.

How do I run a Python program in Windows XP?

Press Ctrl + R , then type python.py to run your Python script. Save this answer. Show activity on this post.


2 Answers

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.

like image 79
Fake Name Avatar answered Oct 09 '22 00:10

Fake Name


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!

like image 21
dkellner Avatar answered Oct 09 '22 02:10

dkellner