python3.12 --version # Output: Python 3.12.2
For Ubuntu users, the most reliable method for getting newer Python versions is using the deadsnakes PPA. sudo apt update Use code with caution. Copied to clipboard Step 2: Add the deadsnakes PPA sudo add-apt-repository ppa:deadsnakes/ppa sudo apt update Use code with caution. Copied to clipboard upgrade python linux
in your ~/.bashrc :