Jump to content

Python 3.8.13 for Windows XP SP3


cmalex

Recommended Posts

Greetings.

Completely disabled IPv6, if_nametoindex, if_indextoname.

Stub for add_dll_directory.

A list of failed tests is included.

Tested on youtube-dl-2021-12-17, yt-dlp-2022.06.29, streamlink-4.1.0, mitmproxy 6.0.3 (patched with zstandard from WHL folder).

https://mega.nz/folder/KxExlAiC#L9rAQ5kTCtlHgZUwaxMpgw

PS. Sorry, I have a problems with email. So there may be a huge delay in responses...

Best regards.

Link to comment
Share on other sites


Thank you. I responded to the PM now, i'll reply here too. I downloaded the python 3.8 for future backup now. I only ever need it for "streamlink" to watch live twitch streams daily. It's working OK currently for python 3.7 + whatever last 3.xx is for streamlink.

Link to comment
Share on other sites

5 hours ago, Sergiaws said:

It is really fully working? As far as I know Python 3.7 backported to XP has problems with some Internet stuff.

Greetings.

Time will tell.  mitmproxy 7.x fails because of fully disabled IPv6 support.

3.8.13 fails 16 standart tests (passes 363) at this moment on clean virtual WinXPSP3 . But I see ways to improve this result.

For comparison - 3.7.1 fails 84 tests (passes 280) on the same system.

On Win8.1, the official installation passes all tests.

winxp_virtual.7z

Edited by cmalex
Link to comment
Share on other sites

  • 2 months later...

I ran into a problem compiling psutils under this custom build of 3.8.1350 for XP.  I received the error message

Quote

c:\Python38\include\pythread.h<h128>: fatal error C1189: #error: "Require native threads See https://bugs.python.org/issue31370"

Does this mean that this Python interpreter was built using the --without-threads option in order to disable threads?

Is there some way under Windows to see a list of the options used to build Python so as to see if the --without-threads option was included?

Could cmalex provide a list of the options they used when compiling his custom Python 3.8.1350?

The archive of Python binaries provided by cmalex is a mess, so I selected and reassembled the relevant files to make a standard Python distribution which you can obtain here.  Pip is not included but it can be installed using the ensurepip module and this command:

python -m ensurepip --upgrade

I am attaching batch files to write the registry entries that might be required with Python 3.8.  They are intended to work in conjunction with the mingw compiler.  If you are using MSVC the %PYTHONHOME% variable cannot be used.

Python 3.8 Add.bat Python 3.8 Delete.bat

Edited by Zorba the Geek
typo
Link to comment
Share on other sites

Greetings.

On 9/19/2022 at 1:22 PM, Zorba the Geek said:

I ran into a problem compiling psutils under this custom build of 3.8.1350 for XP.  I received the error message

Quote

c:\Python38\include\pythread.h<h128>: fatal error C1189: #error: "Require native threads See https://bugs.python.org/issue31370"

Does this mean that this Python interpreter was built using the --without-threads option in order to disable threads?

3.8.1350? I'm not sure about version numbering.  3.8_1a5d0099c3 work with psutil 5.6.7 normally. psutil > 5.6.7 throwed away WinXP support.

Please take look at pyconfig.h - it must contain string "#define NT_THREADS"

On 9/19/2022 at 1:22 PM, Zorba the Geek said:

Could cmalex provide a list of the options they used when compiling his custom Python 3.8.1350?

Mostly standard. It was build on MS VC 2017. Changes in config files listed in Python3.8_dev_1a5d0099c3.7z/patch.diff

Best regards.

psutil-5.6.7-cp38-cp38-win32.whl

Link to comment
Share on other sites

  • 2 weeks later...

So far, everything looks quite promising. Great work!

However, I need to rebuild some more packages as the prebuilt binaries have their own linkage problems.

May I ask you how you built the wheels provided here, on Windows 7 or on Windows XP itself? It seems I need MSVC 14.x for that package (wxPython 4.1.1). Is it possible to get the full SDK along with the build tools ready on an XP environment? If not, I might have to dig deeper into getting the script to target XP.

Thanks in advance.

Link to comment
Share on other sites

On 10/3/2022 at 7:12 PM, Mike_1996 said:

how you built the wheels provided here, on Windows 7 or on Windows XP itself?

Greetings.

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

For full Posix enviroment i'd used MSYS from mingw,org (AFAIK now it hosted at https://osdn.net/projects/mingw/). MSYS2 didn't work for me because of lack SSE2 support. psutils were built in MSVC 2017 (Win8.1).

On 10/3/2022 at 7:12 PM, Mike_1996 said:

wxPython 4.1.1

Do You need exact version? As for now i don't find ways to build it in mingw...

My MSVC build gave "Invalid access for memory location" error - same as wxWidget from PyPi do.

Best regards.

Link to comment
Share on other sites

Greetings.

On 10/3/2022 at 7:12 PM, Mike_1996 said:

wxPython 4.1.1

Wouldn't it be difficult for You to test the compiled package wxPython 4.2.1? https://mega.nz/file/ulk3SZhL#Yn_OAQ67cKljIIVZuAMvWlOG2wemrkD8JOm9PNFX5GU

Compiled Numpy 1.24 https://mega.nz/file/j01VFB7C#4jk54UWLqjwDxAJWseRCBI7kI6Mo9mqr2LdtgjUBOcM

To get Pillow 9.2.0 work in WinXP You need to replace "kernel32" to "kernelxp" in pyd files.

DLLs search path doesn't work in my build of Python - so You need to move all dlls recursively from lib/site-packages to PATH folder (or to python.exe folder).

Best regards.

Link to comment
Share on other sites

  • 3 months later...
On 9/19/2022 at 12:22 PM, Zorba the Geek said:

The archive of Python binaries provided by cmalex is a mess, so I selected and reassembled the relevant files to make a standard Python distribution which you can obtain here

Thanks for this! :)

I was able to build yt-dlp with it, but it complained about missing files, but went on after extracting 'python3.8.zip' into '.\Lib'

Furthermore it was missing 'pyconfig.h' from '.\Include', so I added that from a Python 3.7 install and it worked.

From yt-dlp's dependencies only the websockets module failed to embed during yt-dlp's compiling, so I had to edit that out of 'pyinst.py'

(scrap that. websockets is now included).

Link to the binary in my signature.

[debug] Command-line config: ['-v', '--ignore-config']
[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 2023.02.09 [f14c23334] (win_x86_exe)
[debug] Python 3.8.13+ (CPython x86 32bit) - Windows-XP-5.1.2600-SP3 (OpenSSL 3.1.0-dev )
[debug] exe versions: ffmpeg N-109535-gfcd557a-Reino (fdk,setts), ffprobe N-109535-gfcd557a-Reino
[debug] Optional libraries: Cryptodome-3.17, brotli-1.0.9, certifi-2022.12.07, mutagen-1.46.0, sqlite3-2.6.0, websockets-10.4
[debug] Proxy map: {}
[debug] Loaded 1766 extractors

Usage: yt-dlp [OPTIONS] URL [URL...]

yt-dlp: error: You must provide at least one URL.
Type yt-dlp --help to see a list of all options.

 

Edited by nicolaasjan
Link to comment
Share on other sites

  • 1 month later...
On 19.09.2022 at 13:22, Zorba the Geek said:

Я столкнулся с проблемой при компиляции psutils под этой кастомной сборкой 3.8.1350 для XP. Я получил сообщение об ошибке

Означает ли это, что этот интерпретатор Python был создан с использованием параметра --without-threads для отключения потоков?

Есть ли способ под Windows увидеть список параметров, используемых для сборки Python, чтобы увидеть, включен ли параметр --without-threads?

Может ли cmalex предоставить список опций, которые они использовали при компиляции его пользовательского Python 3.8.1350?

Архив двоичных файлов Python, предоставленный cmalex, представляет собой беспорядок, поэтому я выбрал и повторно собрал соответствующие файлы, чтобы создать стандартный дистрибутив Python, который вы можете получить здесь . Pip не включен, но его можно установить с помощью модуля surepip и этой команды:

Я прилагаю пакетные файлы для записи записей реестра, которые могут потребоваться для Python 3.8. Они предназначены для работы в сочетании с компилятором mingw. Если вы используете MSVC, переменную %PYTHONHOME% использовать нельзя.

Python 3.8 Add.bat 1,4 КБ · 6 загрузок Python 3.8 Удалить.bat 905 Б · 5 загрузок

Hello, I can't get Pillow to work on your assembly.

Error:

from . import _imaging as core
ImportError: DLL load failed: The specified procedure could not be found.
Any ideas?
Thank you

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...