These versions can significantly lag behind latest Python releases. For example, Ubuntu 20.04 ships with Python 3.8 by default whereas Python 3.10 is the latest version as of writing. To actually upgrade and install newer Python on Ubuntu, we need to enable the deadsnakes Python PPA repository: sudo add-apt-repository ppa:deadsnakes/ppa. If you want Python 3.13 to be the default version when you type python3, you can set up update-alternatives to manage different versions of Python. Follow these steps: Add Python 3.13 to Alternatives: sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.13 1; Select Python 3.13 as Default: sudo update-alternatives.
How to update and update Python3 on Ubuntu by downloading Python binaries from the source. What you need to Update Python to a specific version (let's say Python 3.12.0) within Ubuntu. An alternative to update and use the latest Python versions using Pyenv. How to completely uninstall and remove an updated/upgraded Python version on Ubuntu.. Upgrade to Python 3.13 on Ubuntu 20.04 and 22.04 LTS is a straightforward process if you follow these steps carefully. By compiling from source, you ensure that your system remains stable while taking advantage of the latest Python features and improvements. Whether you're developing new projects or maintaining existing code, Python 3.13.