Install python is one of the first steps on programming with python. some difficulties may occur while installing python. In this blog, I will guide you on how to install python on ubuntu. There are different ways to install python. different Operating System has different installation file available on official site of python here is a link of the site. From where you can download file for your OS. if you use Window Operating System then here is my another blog on this topic you can visit.
Steps To Install Python On Ubuntu
- Here we can start to install through the terminal. So first, we need to open a terminal by simply search on all application search bar or simply press Ctrl+Alt+t at the same time. When the terminal is open then update by the following command. This command will update the local package manager.
sudo apt-get update
- After successfully complete first step then we can install python by the following command. It may take a few times to depend upon internet speed and processing capacity of the computer.
sudo apt-get install python3
You can also install by specifying specific version at the end of the command. eg: Sudo apt-get install python3.8 and so on. This is one of the best practices to install python’s specific version.
- And we are installing python on Ubuntu successfully. After that, we can check it’s the version by type following command on terminal. One important thing we need to know about python on ubuntu is if we use python command on the terminal it’s should be python version 2 and if you want to work on python3 should type python3 on terminal
Now let’s confirm of install python on your computer by print hello world on the terminal. You can run python code on by just type python3 on your terminal and simply write print(“hello world”) on your terminal and seen output. One important thing of how to exit from python terminal just simply types exit() and hit Enter button
This is how you can install python. if you are planning to learn python and machine learning you can visit the python tutorial list and learn something new. If you have any problem on install python feel free to comment here