Install Python3 Ubuntu
Introduction to Python
Python is a general-purpose, high-level, object-oriented, interactive, and interpreted programming language. During 1985-1990, it was developed by Guido van Rossum. Also, the source code of Python is available upon the GNU GPL (General Public License) like Perl. Python language is named after a television show known as eMonty Pythonis Flying Circusi and not after Python snake.
The 3.0 version of Python was published in 2008. However, this version is assumed to be backward incompatible, later several of its essential aspects have been backported to be suitable for the 2.7 version.
Python was integrated by Guido van Rossum in the early 90s and late 80s at the National Research Institute for Computer Science and Mathematics in the Netherlands.
Why Learn Python 3?
Python is an object-oriented, interactive, interpreted, and high-level scripting language. It is developed to be highly readable. It frequently applies English keywords in which other languages apply punctuations and it contains fewer syntactical constructions as compared to other languages.
Python language is a must for working professionals and students to become the best software engineer specifically when they want to be in the Web Development Domain. We will list down a few advantages of understanding Python:
Below are some essential Python characteristics:
As mentioned above, Python is one of the most used languages on the web. We are going to list some of them below:
Improved Modules of Python 3.8
Installing Python3 in Ubuntu
We will explain the steps for installing Python3 in Ubuntu in this article. Python is a very famous open-source, high-level, and interpreted programming language. Programmers and developers love to code in Python because of its easy development with other programming languages. However, there are several ways for installing Python3 in Ubuntu but here we will concentrate on the easiest way.
Update our server
It is always recommended to update our system using the apt-get update or apt update command before we think about installing a new package. These commands will install every version of our package and decrease the chances of broken package errors.
The command is as follows:
While we can install any version of the python3 package based on our requirement but here we will install the current version with the help of the following command:
Checking Python3.8 version
We can check the installed Python version with the help of the following command:
Write our first program using Python3.8
We must be now thinking about how we can verify the usability of the Python tool. We can write an easy Python file and execute it to confirm. For example, we are writing an easy Python program for printing 'hello world'. We are making a new file known as 'hello.py' with the help of the nano editor and specifying a print statement to show 'hello world'.
How to uninstall Python3.8
If we want to remove Python from our Ubuntu system which we have installed previously, we can uninstall it by using the following command:
There are two primary approaches for installing Python 3.9 in the Ubuntu system. But we will proceed with the straightforward and convenient approach. Our terminal will be opened by clicking Ctrl+Alt+T. Once our terminal is opened, we can follow the following steps.
Step 1- Adding PPA repository
First of all, we need to add the PPA repository before going to directly install Python 3.9 in the Ubuntu system.
The command is as follows:
Step 2- Update the system
We can apply the update command for updating our apt cache. This command will aid to update every package listed in Ubuntu.
Step 3- Install Python 3.9
Once every package is updated, we can use the following command for installing the updated release of Python 3.9:
Step 4- Checking the version
Python 3.9 is now installed on our system. We can check the version of Python with the help of the following command:
The installation process of the 3.9 version of Python is now completed.
How to Remove Python 3.9 from Ubuntu
In addition, if we wish to uninstall or remove python 3.9, the below command will be applied and it will delete Python 3.9 version from our system:
Note: We can install python3.9 similarly like python3.8.