
The previous python installation does not provide pip by default, so you will have to do: python3.x -m ensurepip -upgrade Note: Python2.7 (all), Python 3.6 (bionic), Python 3.8 (focal), Python 3.10 (jammy) are not provided by deadsnakes as upstream ubuntu provides those packages. The maintainer of the PPA informs that they only ship Python 3.7 as the lowest version for Jammy, so if you wish to install the more older version, you might want to install it for source. You can then install previous Python versions, for example Python 3.7: sudo apt install python3.7 Then, we will import deadsnake’s PPA: sudo add-apt-repository ppa:deadsnakes/ppa Sudo apt install python3.8 Installing Pythonįirst of all, you’ll need the following package installed so we can import any PPA (Personal Package Archive) repositories: sudo apt install software-properties-common -y

Sudo add-apt-repository ppa:deadsnakes/ppa -y In this article, I will show you how to install Python 3.7 up to 3.9 TLDR sudo apt install software-properties-common -y Indeed, you can install more versions via the upstream repository but it only provides Python 2.7 and Python 3.10 modules. Canonical recently announces the general availability of Ubuntu 22.04 Jammy Jellyfish LTS on April 21, 2022.
