To check if the Python3.7 is installed successfully, run the following command: python3.7 -V
Once, the repo is added and the system is updated, execute the command below: sudo apt install python3.7 -y Sudo add-apt-repository ppa:deadsnakes/ppa To install Python3.7, you need to add the repository first: sudo apt install software-properties-common Now we are going to install lower Python3 versions such as Python3.7, Python3.6 and Python3.5 In the previous steps we installed the default Python versions in Ubuntu 20.04, Python3.8, and Python2.7. You should get the following output: python3 -V To check if the Python3 version is installed successfully execute the command below: python3 -V To install the default Python3 version execute the following command: sudo apt install python3 -y You should get the following output: python2 -V To check if the Python2 version is installed successfully execute the command below: python2 -V To install the default Python2 version execute the following command: sudo apt install python2 -y In the first step of this tutorial we are going to install the default Python2 and Python3 versions in Ubuntu 20.04. sudo apt update -y & sudo apt upgrade -y Step 1. User privileges: root or non-root user with sudo privilegesīefore installing anything on your server it is recommended to update the system packages to their latest versions available.