Jump to content

Python 3.8.13 for Windows XP SP3


cmalex

Recommended Posts

On 4/25/2023 at 4:35 PM, genieautravail said:

@Zorba the Geek

Your compiled version of LOKI doesn't works on my computer

Any idea of what happen ?

Regards

nettaddr requires IPV6 to be installed because it is not installed by default as in VISTA+.  In your Local Area Connection Properties install the network protocol Microsoft TCP/IP Version 6.

The problem seems to be linked to the line

IPV6_LOOPBACK = IPAddress('::1')

in C:\Python38\Lib\site-packages\netaddr\ip\__init__.py.  Maybe cmalex could help me sort it out.  Alternatively I could raise an issue at the LOKI Github site.

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


After version 3.4.2 of psutil the section Return the number of physical CPU cores was removed for XP and VISTA because the developers preferred to use GetLogicalProcessorInformationEx rather than XP's GetLogicalProcessorInformation.  I have restored the Return the number of physical CPU cores section for XP and VISTA in psutil-5.5.1

I have removed the condition "#if (_WIN32_WINNT >= 0x0600)" from the Get process IO priority as a Python integer and Set process IO priority sections because NtSetInformationProcess and NtQueryInformationProcess are exported from the Windows XP version of ntdll.dll (5.1.2600.7682)

  You can obtain direct downloads of psutil-5.5.1-cp27-cp27m-win32-mod.whl and psutil-5.5.1-cp38-cp38-win32-mod.whl from my 4Shared account.

Also available as direct downloads from my OneDrive account.  psutil-5.5.1-cp38-cp38-win32-mod.whl and psutil-5.5.1-cp27-cp27m-win32-mod.whl

Included is my modified source code.

_psutil_windows.c

Note: 4Shared is blocked in the UK, so UK residents need to access 4Shared from a VPN server located in the US or Netherlands.

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

I have compiled Windows XP compatible builds of psutil-5.6.1 including the modifications I made in my builds of psutil-5.5.1.  These include restoring  the Return the number of physical CPU cores section using code from version 3.4.2, and removing the condition "#if (_WIN32_WINNT >= 0x0600)" from the Get process IO priority as a Python integer and Set process IO priority sections.

You can obtain direct downloads of psutil-5.6.1-cp27-cp27m-win32.whl and psutil-5.6.1-cp38-cp38-win32.whl from my 4Shared account.

Also available as direct downloads from my OneDrive account:  psutil-5.6.1-cp27-cp27m-win32.whl and psutil-5.6.1-cp38-cp38-win32.whl

Included is the modified source code including ntextapi.h for Python 2.7

Incidentally compiling psutil without modifications under Windows 8.1 produces lots of warning messages.  Is this normal or is it sloppy programming?

_psutil_windows.c ntextapi.h

Note: 4Shared is blocked in the UK, so UK residents need to access 4Shared from a VPN server located in the US or Netherlands.

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

On 4/27/2023 at 11:58 AM, genieautravail said:

@Zorba the Geek

In the results of a scan, an error message is displayed:

|Traceback (most recent call last):
  File "loki.py", line 544, in get_string_matches
TypeError: 'yara.StringMatch' object is not subscriptable

I think that this may be caused by incorrect formatting of the yara rules and another definitions update may resolve it.  An outdated version of yara-python might also be a cause except that we are using the penultimate version 4.3.0.  Version 4.3.1 was released last week.

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

Greetings.

To folder Whl\Compiled added Pillow 9.5 and openCV-python 4.7.0.72  (without video! require psapi.dll kernelxp.dll libwinpthread-1.dll from External folder in python root and numpy-1.24.0.dev0+481.gb89a1d2-cp38-cp38-win32.whl from Whl)

Also (thanks to @greenhand ) i'd done with QT5.4.2 and QT5.7.1  (both without SSE2), CMake 3.15 and bunch of libraries (zstd, brotli, libwebp etc) https://mega.nz/folder/6gU2Ba5I#ZO1ckLdkS76Dzo5eWR-9qg

All compiled with i686-8.1.0-release-posix-dwarf-rt_v6-rev0.7z

Best regards.

Link to comment
Share on other sites

  • 3 weeks later...
  • 4 weeks later...

I am having trouble getting pillow to work with the archive-org-downloader.py module under Python 3.8.13.  After downloading all the pages of a book as jpeg files img2pdf is not able to compile them as a single pdf.  Here is the output message I receive:

Traceback (most recent call last):
  File "archive-org-downloader.py", line 227, in <module>
    import img2pdf
  File "D:\Python38\lib\site-packages\img2pdf.py", line 25, in <module>
    from PIL import Image, TiffImagePlugin, GifImagePlugin
  File "D:\Python38\lib\site-packages\PIL\Image.py", line 94, in <module>
    from . import _imaging as core
ImportError: DLL load failed while importing _imaging: The specified module could not be found.

To work under XP I have modified the import directory of _imaging.cp38-win32.pyd and _webp.cp38-win32.pyd to change KERNEL32.DLL to kernelxp.dll, and in the Optional Header section the MajorOperatingSystemVersion and MajorSubsystemVersion have been changed from 6 to 5.  The same changes to the Optional Header section have been made to _imagingcms.cp38-win32.pyd, _imagingft.cp38-win32.pyd, _imagingmath.cp38-win32.pyd, _imagingmorph.cp38-win32.pyd, _imagingtk.cp38-win32.pyd.

I tried downgrading pillow from version 9.5 to version 8.0 but no joy.  Should I use the pillow compiled by cmalex?

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

Greetings.

On 5/23/2023 at 8:07 PM, Cockatiel said:

Does it will work for Vista?

I didn't know. I have no way to check it on Vista. It work well on WinXP and Win8.1...

On 6/20/2023 at 11:43 AM, Zorba the Geek said:

To work under XP I have modified the import directory of _imaging.cp38-win32.pyd and _webp.cp38-win32.pyd to change KERNEL32.DLL to kernelxp.dll

That should have been enough.

img2pdf with Pillow 9.5 from pypi work with me with just KERNEL32.DLL to kernelxp.dll change in _imaging.cp38-win32.pyd (JPG, PNG, GIF work normally. TIFF fail due to SSE2 lack. I'll do full check later on SSE2 virtual).

Please add Python folder to PATH variable and check _imaging.cp38-win32.pyd with  depends.exe ("Dependency Walker",  https://www.dependencywalker.com/)

UPD - once more - i edit _imaging.cp38-win32.pyd with HxD. So fc /b

Comparing files _imaging.cp38-win32.pyd and _IMAGING.CP38-WIN32.OLD
001EA6CC: 58 33
001EA6CD: 50 32

Best regards.

Edited by cmalex
Link to comment
Share on other sites

I am attempting to use the python module for downloading books from archive.org that can be only be borrowed for a one hour time slot.

For some reason the downloads are no longer working, perhaps because I have borrowed the book too many times.  If I try to compile a saved download using img2pdf and the modified official pillow 9.5 build using

python -m img2pdf *.jpg -o output.pdf

I receive the error message

ImportError: DLL load failed while importing _imaging: The specified module could not be found.

However I have had more luck using cmalex's build of pillow 9.5 which is included in his distribution of python 3.8.13 under the Whl\Compiled folder.  It seems to be completely different from the official build and may have been built under mysys2 because various dependencies are included separately in a bin folder.  The following files need to be moved from the bin folder to the PIL folder: libjpeg.dll, libopenjp2.dll, libtiff.dll, libwebp.dll, libwebpdemux.dll, libwebpmux.dll, and libzlib.dll.  The only problem is libwebp.dll is missing the dependency libsharpyuv.dll.  I cannot find a 32 bit binary distribution of libwebp, but that does not matter because img2pdf works fine without libsharpyuv.dll. 

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

  • 1 month later...
  • 4 weeks later...
On 7/10/2022 at 7:35 AM, cmalex said:

Thank you for your share. I use your python 3.8.13 in XP. And want to install pywin32. Could you please give me some tips?

 

When using "pip install pywin32==300" pywin32, `win32ui` module seems not work.

```shell

python -c "import win32ui"

```

output:

```

Traceback (most recent call last):
  File "(string)", line1, in <module)
ImportError: Dll load failed while importing win32ui: 内存分配访问无效(Meaning: Memory allocation access invalid)

```

Edited by lld9999
Link to comment
Share on other sites

  • 2 months later...

I see you are using an updated version of XomPie Could you share the source? or were you found it?

I would be interested so that I can better patch random command line programs that I come around when needed.

Link to comment
Share on other sites

  • 3 weeks later...
On 09 September 2023 at 10:51 AM, lld9999 said:

When using "pip install pywin32==300" pywin32, `win32ui` module seems not work.

```shell

python -c "import win32ui"

```

output:

```

Traceback (most recent call last):
  File "(string)", line1, in <module)
ImportError: Dll load failed while importing win32ui: 内存分配访问无效(Meaning: Memory allocation access invalid)

```

I downloaded pywin32-300-cp38-cp38-win32.whl from pypi.org and extracted win32ui.pyd, but Dependency Walker did not reveal missing imports.  You can try using this installer that I have archived for my own use using this link pywin32-300.win32-py3.8.exe

Link to comment
Share on other sites

  • 2 weeks later...

Hi there, @cmalex. I've been trying to set up pyton 3.8 in xp, but the instructions in PythonXP\README are not enough for me, poor illiterate folk, to make it work. Could you explain in more detail (as in spoonfed) how to set it up, and what items to include in path to run it? Thank you very much.

 

 

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