Ubuntu 20.04 - Multiple Python Version using DeadSnakes

Hope this article help to install Multiple Python in Ubuntu.

Step by Step


1. update package list

sudo apt update

2. install required package

sudo apt install software-properties-common
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt update

3. install python version example using 3.10

sudo apt-get install python3.10
sudo apt-get install python3.10-venv

Congratulations. all setup already installed, check the result

check the list of installed Python versions

sudo update-alternatives --list python

direct checking python version

python3 --version
python3.10 --version

checking python version location

whereis python3
whereis python3.10

Reference

  • GPT-3.5