Changing the system default Python version is a common mistake that breaks the OS, requiring a reinstall or complex recovery.

: sudo apt update && sudo apt upgrade -y

Using the deadsnakes PPA provides the simplest, most maintainable way to install Python 3.10 on Ubuntu. It leaves the system’s default Python intact and allows switching between versions via virtual environments or explicit shebangs.