Branch pyupgrade report
peardox opened this issue · 28 comments
Works great so far (yet to give it the harder tests)
Windows x64 runs as normal with newer Python 3.9.15 (only version tested)
Linux x64 runs great on the build box as does my PR for GetPIP - need to see what other Linux distros think of it, got Arch x64 x2 - One a laptop with latest and one older one on Steam Deck. Also want to try running in a clean VM with Ubu 20.04 + 22.04 (build box is 22.04)
Linux images...

Note this is the FIRST time this has worked without me having to hack around with the system to firnd missing libs
The next image is a re-run - rather similar (expected) but note the PIP version is now 22.3
I'll try other Distros in the AM (02:30 here - been at it all day, rest time)
Looks like a good candidate for moving to main to me
Oh - just noticed a Python error - this is NOT PythonEnvironment in any way - that's 'cos the thing's running on a really old GPU that doesn't support some things
Yeah, read all that months ago. Looked into Flatpak as a workaround - whole different set of problems - wan't a makefile...
Ubuntu 20.04 looks like it will work as a base build target (can't use Arch - the proper target - not recognosed by Delphi) for Steam Deck now Python is static - about to find out.
Rats - Lartis fails owing to bzip2 compatability
Checking StackOverflow this appears to be a common issue
This can, however, be a misleading report as it could be another dependancy of _bz2 causing a bad error report
This looks helpful
https://github.com/indygreg/python-build-standalone
I too want a Steam Deck.
Rats - Lartis fails owing to bzip2 compatability
Checking StackOverflow this appears to be a common issue
This can, however, be a misleading report as it could be another dependancy of _bz2 causing a bad error report
Share your error then.
I too want a Steam Deck.
I was lucky, the government gave some people without a "job" 650 GBP in two parts. That was enough to get the mid-range Steam Deck with a Dock and some other stuff. They are, however, not really up to running AI to be honest as the GPU is AMD (I'd hoped ROCm yould work - it doesn't).
Share your error then.
Traceback (most recent call last):
File "<string>", line 21, in <module>
File "/home/deck/.Lartis/pysrc/mlfuncts.py", line 11, in <module>
from torchvision import datasets
File "/home/deck/.Lartis/python/3.9/lib/python3.9/site-packages/torchvision/__init__.py", line 5, in <module>
from torchvision import datasets
File "/home/deck/.Lartis/python/3.9/lib/python3.9/site-packages/torchvision/datasets/__init__.py", line 1, in <module>
from ._optical_flow import KittiFlow, Sintel, FlyingChairs, FlyingThings3D, HD1K
File "/home/deck/.Lartis/python/3.9/lib/python3.9/site-packages/torchvision/datasets/_optical_flow.py", line 13, in <module>
from .utils import verify_str_arg
File "/home/deck/.Lartis/python/3.9/lib/python3.9/site-packages/torchvision/datasets/utils.py", line 1, in <module>
import bz2
File "/home/deck/.Lartis/python/3.9/lib/python3.9/bz2.py", line 18, in <module>
from _bz2 import BZ2Compressor, BZ2Decompressor
ModuleNotFoundError: No module named '_bz2'
Import Exception in RunSystem
Class : EPyImportError
Error : ModuleNotFoundError: No module named '_bz2'
Value : No module named '_bz2'
Name : ModuleNotFoundError
RunSystem Completed
I think that compiling the Python on an distro may help as the main Delphi worked fine on the deck - i'll give it a go to see what happens.
Here's a slightly more specific error report by running the embedded manually
Note ./py is a copy of activate.sh with bin/python3.9 added to the end to manually start Python
(deck@steamdeck 3.9)$ ./py
Python 3.9.15 (main, Oct 15 2022, 19:07:07)
[GCC 10.2.1 20210110] on linux
Type "help", "copyright", "credits" or "license" for more information.
import bz2 ### I typed this ###
Traceback (most recent call last):
File "", line 1, in
File "/home/deck/.Lartis/python/3.9/lib/python3.9/bz2.py", line 18, in
from _bz2 import BZ2Compressor, BZ2Decompressor
ModuleNotFoundError: No module named '_bz2'
After some hacking around I got a version that sorta works on deck - lzma may be an issue - can't be sure, haven't tried the stuff that causes that (yet)
From Python build docs
At the end of the build you should see a success message, possibly followed by a list of extension modules that haven�t been built because their dependencies were missin
Python build finished successfully!
The necessary bits to build these optional modules were not found:
_bz2 _dbm _gdbm
_lzma _sqlite3 _ssl
_tkinter _uuid readline
zlib
And...
sudo apt-get install build-essential gdb lcov pkg-config
libbz2-dev libffi-dev libgdbm-dev libgdbm-compat-dev liblzma-dev
libncurses5-dev libreadline6-dev libsqlite3-dev libssl-dev
lzma lzma-dev tk-dev uuid-dev zlib1g-dev
So I did that and copied the missing _bz2.cpython-39-x86_64-linux-gnu.so to the deck's lib/python3.9 dir and it all worked fine again.
I have previously seen missing lzma related stuff when testing on Mac as well
bzip2 is included as dependency in the CI
I found the error. I'm fixing it.
Well, installing with the pyupgrade branch it errored as above - do I need a different branch?
Cool
Update it and retry.
I will remove TK from the macOS package, it will lean out the final zip file.
Updated and retried - perfect
May as well release it unless you need anything else checking
Possibly add Update GetPIP PR?
Can you promote pyupgrade to main please - I just got proper 11.2 and I've just installed the version with broken Linux
Accepting the getpip upgrade property code would also help
I also note that Python 3.11 has just gone public release - definitely a good time to update this repo
@peardox new changes were just merged. I will release a new version as we get cp3.11 working.
@lmbelo What changed are there? There's no fixes list I can see.
I notice samples is new
Fix list will be displayed in new releases
Got a little weekly household stuff to do, will start a fresh test when that's done.
I've been playing with finding all Installed Components to improve my https://github.com/peardox/MakeP4DComponents (reading Registry - not ToolsApi)
It looks like the stuff I'm doing there might be good for a P4D Suite install useful as well as I'm identifying things that go wrong when installing
Closing this cos we're on a new branch




