Help with python3

hi community. I need your help.

im running a RPI 3b with the core(?) version of HA, meaning i run server and client on the same machine (its hooked up to a screen) and ive been struggling to update HA since i was stuck on 2022.10.4. Long story short, i had to fiddle a ton with python, rust and other things to finally get the update to work. So homeassistant is running in its own user, homeassistant.

now, its on the version 2023.1.7,but its warning me that the python ver 3.9.2 will no longer be supported in next version. The problem is that i simply cant figure out how to upgrade the python3 version which is below. running a check i found online i get the following:

-rwxr-xr-x 1 root root 4703672 12 mar 2021 /usr/bin/python3.9
-rwxr-xr-x 1 root root 2952092 14 jul 2021 /usr/bin/python2.7
lrwxrwxrwx 1 root root 9 28 jul 2021 /usr/bin/python2 → python2.7
-rwxrwxrwx 1 root root 17551872 18 feb 11.53 /usr/bin/python3.10
lrwxrwxrwx 1 root root 25 18 feb 12.53 /usr/bin/python → /usr/local/bin/python3.10
lrwxrwxrwx 1 root root 18 18 feb 13.19 /usr/bin/python3 → /usr/bin/python3.9

so as i figure, the homeassistant-user is running on the python3 commands while the rest of the system is on the python3.10. There is also an old python2 version.

i tried simply pointing python3 to the local 3.10 but no luck, i tried copying the 3.10 file to usr/bin but then HA doesnt start. finally reverted to above setting and then HA works.

how the *** do i update python3 to above 3.9.9 ? i am not very well versed in linux commands so everything is a real struggle.

please help

For anyone who struggles as i did with python3, follow this guide to install pyenv and it seems to work ok!

https://linuxhint.com/switch-multiple-python-versions-raspberry-pi-pyenv/