sudo apt install python3.10 #or whatever version you want sudo update-alternatives --config python3 #select which version you want to use More info on how here -> https://cloudbytes.dev/snippets/upgrade-python-to-latest-version-on-ubuntu-linux