# Register versions sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.10 1 sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.12 2
You can upgrade Python using the apt package manager. Here's how:
Upgrading Python on Ubuntu can be tricky. Unlike other software, you generally uninstall the system-installed version of Python. Ubuntu relies heavily on Python for system tools, scripts, and package management (APT). Removing the default version can break your operating system.