dmiranda Posted October 30, 2024 Posted October 30, 2024 (edited) On 10/7/2022 at 12:03 PM, cmalex said: Most of wheels were built with http://files.1f0.de/mingw/mingw-w64-gcc-6.1-stable-r20.7z . http://files.1f0.de/mingw/mingw-w64-gcc-10.3-stable-r34.7z also work well on WinXP. Simple bat example set "PATH=C:\Python38;D:\Mingw_61\bin;%PATH%" python setup.py -c mingw32 Hi there. It's been a decade since I've tried to build something, but all this chat has got me hooked to try and see if old XP can do it. I decided to give a try to MSYS from https://github.com/akosela/msys2-xp, which claims pacman support, using http://files.1f0.de/mingw/mingw-w64-gcc-10.3-stable-r34.7z for mingw32. "This project specifically aims to compile Yamagi Quake II for Windows XP. It includes all of the required dependencies. It also provides some other useful programs: mutt, irssi, tmux, git, ssh, lftp, curl/wget. If you need additional packages that still work under this version of MSYS2 you can take a look here: https://mirrors.huaweicloud.com/msys2. Download them to /msys2/var/cache/pacman/pkg and install with: $ pacman -U <package>.pkg.tar.xz" I plan to also play with the minimalist https://archive.org/details/msys2xp, which comes with its own mingw 32 and a (alleged) control of package integrity. I'm on 32, so I delete all 64. In the meanwhile, I've been trying your set "PATH=C:\Python38;D:\Mingw_61\bin;%PATH%", but I run into an issue with "python setup.py -c mingw32": setup.py, not found. I searched in the files and found ...\Python\Lib\test\libregrtest\setup.py. Is that the one I'm supposed to use? Thank you very much, Cmalex (and Zorba). Edited October 30, 2024 by dmiranda
Zorba the Geek Posted October 31, 2024 Posted October 31, 2024 On 30 October 2024 at 1:01 AM, dmiranda said: In the meanwhile, I've been trying your set "PATH=C:\Python38;D:\Mingw_61\bin;%PATH%", but I run into an issue with "python setup.py -c mingw32": setup.py, not found. I searched in the files and found ...\Python\Lib\test\libregrtest\setup.py. Is that the one I'm supposed to use? Where did you get "PATH=C:\Python38;D:\Mingw_61\bin;%PATH%" from? To me this looks odd because the the path to Python38 is in the C drive and the path to Mingw is in the D drive. No wonder you are having problems. I cannot be bothered with virtual environments and all that, so alI I do is run a batch file to set the Python paths and change into the folder containing setup.py. The path to Mingw is set in the Windows registry in this key: HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment and is usually entered in System Properties/Advanced/Environment Variables. You probably know this already, but for newbies it is necessary to create a file named distutils.cfg in the folder Python38/lib/distutils with these entries: [build] compiler=mingw32 [build_ext] compiler=mingw32 My batch file for setting the Python environment variables is included below: CP38_Env.bat
dmiranda Posted October 31, 2024 Posted October 31, 2024 9 hours ago, Zorba the Geek said: You probably know this already, but for newbies it is necessary to create a file named distutils.cfg in the folder Python38/lib/distutils with these entries: [build] compiler=mingw32 [build_ext] compiler=mingw32 Hi Zorba, I misunderstod cmalex's wording, that's all. As per python, I'm a newb (so thank you very much for the indications above). msys-mingw I used to play with back when xp was young and shinny, so everuthing was all setup and updated with little (relative to today) user input, a long time ago. Cheers!
Zorba the Geek Posted November 3, 2024 Posted November 3, 2024 On 28 October 2024 at 2:51 PM, dmiranda said: tcl8.6 and tkl8.6 (as in zorba's and cmalex folders) don't work. Doing the following seems to make the trick: move root\wish86t.exe and root\tclsh86t.exe into root\TCL\tclsh86t.exe and root\TCL\wish86t.exe move the following folders from root\TLC to root\Lib (only files get left in TLC) dde1.4, itcl4.2.2, nmake,reg1.3, sqlite3.36.0, tlcl8, tdbc1.1.3, tdbcmysql1.1.3, tdbcodbc1.1.3, tdbcpostgres1.1.3, tdbcsqlite31.1.3, thread2.8.7, tcl8.6, tk8.6 This seems really weird. I can only suppose that there is a problem with paths somewhere. You can see a list of Python's built-in search paths using the following command: python.exe -c "import sys;print(sys.path)" This gives the following list for Python 3.8.1350: D:\Python38 D:\Python38\DLLs D:\Python38\Lib D:\Python38\lib\site-packages D:\Python38\lib\site-packages\win32 D:\Python38\lib\site-packages\win32\lib D:\Python38\lib\site-packages\Pythonwin D:\Python38\lib\site-packages\pywin32_system32 D:\Python38\python38.zip D:\Python38\site-packages Here is the list of paths for Python 3.4: D:\Python34 D:\Python34\DLLs D:\Python34\site-packages D:\Python34\Lib D:\WINDOWS\system32\python34.zip D:\Python34lib\site-packages There does not need to be a path for the TCL directory because tk86t.dll and tcl86t.dll are in the root directory along with python38.dll. tk86t.dll and tcl86t.dll have the paths to their libraries baked in at compilation, but if there is a problem you could set these environment variables; set TK_LIBRARY=%SystemDrive%\Python38\TCL\tk8.6 set TCL_LIBRARY=%SystemDrive%\Python38\TCL\tcl8.6 If you have installed Python somewhere other than the root of the system drive you should use these commands: set TK_LIBRARY=.\Python38\TCL\tk8.6 set TCL_LIBRARY=.\Python38\TCL\tcl8.6 I did a test to see if the Tkinter command line (TCL) could be invoked in the usual way using instructions at a site titled Python-Tcl-Interactions First start the Python interpreter by typing python then enter. At the command prompt enter these commands to start an instance of the Tcl interpreter: import tkinter tcl_intrpr = tkinter.Tcl() You can do a test to show that the Tcl interpreter is actually invoked by doing these commands to make a simple calculation: res = tcl_intrpr.eval('expr 12+23') res '35' This proved that Tcl is operating as expected using cmalex's distribution of Python 3.8.1350 for Windows XP.
K4sum1 Posted April 11 Posted April 11 On 2/12/2024 at 2:09 PM, Zorba the Geek said: Yes, I am using Pyinstaller 4.10 under Windows XP with Visual Studio 2010 to package XP compatible binaries of LOKI the IOC scanner. Needless to say I have installed cmalex's XP compatible build of Python 3.8.13. How did you patch Pyinstaller 4.10 to work with XP? I first tried 6.1.0 because it was what the project I use originally supported and had only a few missing functions. I patched the source code, rebuilt and used it but I just get a blank Unhandled exception in script error when it's opened. Then I found this and decided to try 4.10, but it still has one of the things I need to patch So I carried that patch over to 4.10, and it built fine, but when installing it, I get this error and I'm not sure what to do. (env_build) C:\Users\Admin\Documents\GitHub\xl-converter\misc\pyinstaller>pip install . Processing c:\users\admin\documents\github\xl-converter\misc\pyinstaller Installing build dependencies ... done Getting requirements to build wheel ... done Preparing metadata (pyproject.toml) ... error error: subprocess-exited-with-error × Preparing metadata (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [41 lines of output] Traceback (most recent call last): File "C:\Users\Admin\Documents\GitHub\xl-converter\env_build\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 363, in <module> main() File "C:\Users\Admin\Documents\GitHub\xl-converter\env_build\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 345, in main json_out['return_val'] = hook(**hook_input['kwargs']) File "C:\Users\Admin\Documents\GitHub\xl-converter\env_build\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 164, in prepare_metadata_for_build_wheel return hook(metadata_directory, config_settings) File "C:\Users\Admin\AppData\Local\Temp\pip-build-env-5axojfce\overlay\Lib\site-packages\setuptools\build_meta.py", line 376, in prepare_metadata_for_build_wheel self.run_setup() File "C:\Users\Admin\AppData\Local\Temp\pip-build-env-5axojfce\overlay\Lib\site-packages\setuptools\build_meta.py", line 521, in run_setup super().run_setup(setup_script=setup_script) File "C:\Users\Admin\AppData\Local\Temp\pip-build-env-5axojfce\overlay\Lib\site-packages\setuptools\build_meta.py", line 319, in run_setup exec(code, locals()) File "<string>", line 249, in <module> File "C:\Users\Admin\AppData\Local\Temp\pip-build-env-5axojfce\overlay\Lib\site-packages\setuptools\__init__.py", line 117, in setup return distutils.core.setup(**attrs) File "C:\Users\Admin\AppData\Local\Temp\pip-build-env-5axojfce\overlay\Lib\site-packages\setuptools\_distutils\core.py", line 157, in setup dist.parse_config_files() File "C:\Users\Admin\AppData\Local\Temp\pip-build-env-5axojfce\overlay\Lib\site-packages\setuptools\dist.py", line 651, in parse_config_files setupcfg.parse_configuration( File "C:\Users\Admin\AppData\Local\Temp\pip-build-env-5axojfce\overlay\Lib\site-packages\setuptools\config\setupcfg.py", line 199, in parse_configuration meta.parse() File "C:\Users\Admin\AppData\Local\Temp\pip-build-env-5axojfce\overlay\Lib\site-packages\setuptools\config\setupcfg.py", line 512, in parse section_parser_method(section_options) File "C:\Users\Admin\AppData\Local\Temp\pip-build-env-5axojfce\overlay\Lib\site-packages\setuptools\config\setupcfg.py", line 487, in parse_section self[name] = value File "C:\Users\Admin\AppData\Local\Temp\pip-build-env-5axojfce\overlay\Lib\site-packages\setuptools\config\setupcfg.py", line 305, in __setitem__ parsed = self.parsers.get(option_name, lambda x: x)(value) File "C:\Users\Admin\AppData\Local\Temp\pip-build-env-5axojfce\overlay\Lib\site-packages\setuptools\config\setupcfg.py", line 604, in _parse_version return expand.version(self._parse_attr(value, self.package_dir, self.root_dir)) File "C:\Users\Admin\AppData\Local\Temp\pip-build-env-5axojfce\overlay\Lib\site-packages\setuptools\config\setupcfg.py", line 429, in _parse_attr return expand.read_attr(attr_desc, package_dir, root_dir) File "C:\Users\Admin\AppData\Local\Temp\pip-build-env-5axojfce\overlay\Lib\site-packages\setuptools\config\expand.py", line 186, in read_attr module = _load_spec(spec, module_name) File "C:\Users\Admin\AppData\Local\Temp\pip-build-env-5axojfce\overlay\Lib\site-packages\setuptools\config\expand.py", line 207, in _load_spec spec.loader.exec_module(module) File "<frozen importlib._bootstrap_external>", line 843, in exec_module File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed File "C:\Users\Admin\Documents\GitHub\xl-converter\misc\pyinstaller\PyInstaller.py", line 15, in <module> from PyInstaller.__main__ import run ModuleNotFoundError: No module named 'PyInstaller.__main__'; 'PyInstaller' is not a package [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. error: metadata-generation-failed × Encountered error while generating package metadata. ╰─> See above for output. note: This is an issue with the package mentioned above, not pip. hint: See above for details.
cmalex Posted yesterday at 03:33 PM Author Posted yesterday at 03:33 PM (edited) Greetings. https://mega.nz/folder/itlRGKyB#8XNJOvlebW8ghCjaiJrk0w https://mega.nz/file/PhMAEZ7L#8PoBTs7sTt2e7wb3tRotEZhTv9TildrgZTt_lD_kvGI This is archives of all that i'd used to compile wheels undef WinXP. I`d build it at Visual studio 2017 with installed v140_xp toolset For building wheels i have used original MinGW https://osdn.net/projects/mingw/ under WinXP MinGW_all.7z - mingw compilers. Root folder was D:\ Python39NoSSe2.7z - full Python 3.9 with headers, libs and defs. Root folder was C:\ tcl.7z - compiled TCL/TK openssl-3.1.0-win32-dev-xpmod-sse.7z, openssl-3.1.0-win32-xpmod-sse.7z - are development and binary OpenSSL from https://rwijnsma.home.xs4all.nl/files/openssl/ cryptography-3.4.8.7z - lastest cryptography for XP (without RUST) Best regards Edited yesterday at 03:34 PM by cmalex 1
user57 Posted 20 hours ago Posted 20 hours ago i do not know python but if its like a normal compiler it searches for a main() or winmain(), the next error talks something about __main__ looking these 2 lines might be of interests it seems to be some kind of call "PyInstaller.__main__" a import useally is a function that a modules exports (such as a dll (or dllmain()) or in case of executable winmain) combined it says in "PyInstaller" + "__main__" was not found or pyinstaller was not reconized as "package" File "C:\Users\Admin\Documents\GitHub\xl-converter\misc\pyinstaller\PyInstaller.py", line 15, in <module> from PyInstaller.__main__ import run "ModuleNotFoundError: No module named 'PyInstaller.__main__'; 'PyInstaller' is not a package [end of output]" one way i could think of this is happening is that winver in the peheader is set to 6 or higher (6 are vista and 10) in this case a executable caller (such as createprocess) cant open the module - also from consideration the answer from compilers can sometimes not be very precise, it also could be a small type error/syntax error near that area aka PyInstaller at spot __main__ however i do not know the syntax in python
cmalex Posted 15 hours ago Author Posted 15 hours ago (edited) Greetings. >"ModuleNotFoundError: No module named 'PyInstaller.__main__'; 'PyInstaller' is not a package [end of output]" There is some issues with python*._pth files with paths for searching modules. Please try to add it or remove it ;-) Best regards. Edited 15 hours ago by cmalex
nicolaasjan Posted 12 hours ago Posted 12 hours ago (edited) @cmalex Thanks again for your efforts to keep Python alive on vintage operating systems! Using your latest Python 3.9 environment, I successfully updated the included yt-dlp via pip to the Nightly build: pip install -U --pre "yt-dlp[default]" Now I get the warning: Quote Deprecated Feature: Support for Python version 3.9 has been deprecated. Please update to Python 3.10 or above `yt-dlp -v` output: [debug] Command-line config: ['-v'] [debug] User config "C:\Documents and Settings\Nico\Application Data\yt-dlp\config.txt": ['--rm-cache-dir', '--console-title', '--add-metadata', '--embed-thumbnail', '--convert-thumbnails', 'jpg', '--ppa', 'ffmpeg:-metadata synopsis=""', '-o', '~/Bureaublad/%(title)s.%(ext)s', '-S', 'res:720,vcodec:h264,acodec:mp4a', '--sponsorblock-remove', 'all'] Deprecated Feature: Support for Python version 3.9 has been deprecated. Please update to Python 3.10 or above [debug] Encodings: locale cp1252, fs utf-8, pref cp1252, out cp1252 (No VT), error cp1252 (No VT), screen cp1252 (No VT) [debug] yt-dlp version nightly@2025.07.31.233123 from yt-dlp/yt-dlp-nightly-builds [71f30921a] (pip) [debug] Python 3.9.13 (CPython x86 32bit) - Windows-XP-5.1.2600-SP3 (OpenSSL 1.1.1i 8 Dec 2020) [debug] exe versions: ffmpeg N-116828-g6aafe61-Reino (fdk,setts), ffprobe N-116828-g6aafe61-Reino, phantomjs 1.9.8 [debug] Optional libraries: Cryptodome-3.23.0, brotli-1.1.0, certifi-2025.07.14, mutagen-1.47.0, requests-2.32.4, sqlite3-3.37.2, urllib3-2.5.0, websockets-15.0.1 [debug] Proxy map: {} [debug] Request Handlers: urllib, requests, websockets [debug] Plugin directories: none [debug] Loaded 1858 extractors Removing cache dir C:\Documents and Settings\Nico/.cache\yt-dlp .. Python 3.9 support will be fully dropped in October 2025 (#13861). See also #13858. Is it feasible for you to port Python 3.10 or even 3.11 to Windows XP? I'm sure the community here would be very grateful if you succeeded. Edited 12 hours ago by nicolaasjan
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now