how to install python3 on ubuntu 20.04

how to install python3 on Ubuntu 20.40

Requirements to install Python3:

  • The system should be running on Ubuntu 20.04.
  • The user should have root or “sudo” privileges.
  • Terminal window/Command-line (Ctrl+Alt+T)

Installing python 3 using apt command

1.The first thing to do is to find out the version of python already installed in your system. Most factory version of Ubuntu 20.04 come with pre-installed python version. You can check the existing version using the command:

        python3 –version

2. Open the Terminal/Command-line then type the following:

        sudo apt update

3. Installing supporting software like software-properties-common gives the you the control over your package manager. You can install this by typing the command:

       sudo apt install software-properties-common

4. You add Deadsnakes PPA, it let you install multiple Python versions on your Ubuntu system. You can add this using the command:

       sudo add-apt-repository ppa:deadsnakes/ppa

5. You should refresh the package list:

      sudo apt update

6. Finally you can now start the installation of Python and for this we will be installing Python 3.8:

     sudo apt install python3.8

7. To make sure that the installation is complete you can check by using:

     python3 –version

The output should be Python 3.8 and you are ready to go. Python 3.8 is successfully installed in your system.

Leave a Comment

Your email address will not be published. Required fields are marked *