You might consider trying Miniconda, a version of Anaconda. It installs a local python environment of your choosing at a user level.
https://docs.anaconda.com/miniconda/
I Gave it a try on macOS a few days ago because brew and python is a dependencie hell and way to much workarounds to make some scripts to work properly when specific versions of packages are needed...
Miniconda actually made it work fine, without to much hassle. I'm kinda impressed.
You can install the new version of python but leave the system default python as is. You can launch a specific version of python by adding the version number
Careful, there's three different terms in the mix here:
NixOS: an entire operating system, you don't need this.
nix: the nix package manager. This is what you'll need to install. look for single user install in the instructions.
home-manager: a module for nix. It's aim is to allow declarative configuration of a users' home configuration (and allow easier per-user install of packages on a global nix install).
If you want to go down the nix route, which I would recommend if you enjoy tinkering and having fine control over your system, you should start with installing nix. With that, you can already setup a shell that has the newest version of python available.
Going beyond that, I can link you some more resources, if you want c:
Source on the second statement? My understanding was that nix-shell is legacy for systems without flakes and nix-command enabled, and are being replaced by nix shell/run/develop
I found a script online that installed the tar archive. For some reason that version of python still wasnt used, and invoking it with python3.12.6 or something didnt do anything
You should be able to have multiple versions with an environment manager, maybe customize your shell profile to alias python to the one you want and the other users can alias to the one they want. I’m sure there’s a better way, but I strongly dislike python every time I try to learn it because Perl was the first language I learned, ruining me for strongly opinionated languages.
No not a part of the OS and als no idea why they used python, that script is full of crazy functions so may be needed.
I translated the python 3.12 to 3.9 using ChatGPT lol, as even after installing up-to-date python and placing it in my home $PATH the script threw errors.
I think it worked, but there is an issue with my atomic system, so I likely need to build an RPM for the changes or use a different command for akmods or package the kernel myself or whatever.
Not familiar with HeliumOS specifically, but for a generic atomic distro I would try layering Python temporarily, and then getting rid of it when you're done.