Nowadays, most Linux Distros already have Python preinstalled. But you might have a distribution that might not have Python preinstalled. As some OSs allow users to download and install whatever the user feels important and necessary. If you are also using one of such light Linux distros, here is how to install Python on your Linux PC.
There is also a chance that Python is already installed on your Linux system. But you are not able to find it due to some reason. In such cases also continue reading this article till last and you would surely be able to locate and use Python on your Linux PC.
Some Linux system even though comes preinstalled with Python but don’t include the Interactive Development Environment (IDLE) application. This could happen mainly if you have an older version of Python (2.5.1 or earlier) installed on your system. In such cases, you might want to update Python to a newer version so that you could have an access to IDLE.
Installing Python is easier on Ubuntu, as it’s already present in the official Ubuntu repositories. All you need to do is just execute the commands below one by one in the terminal.
sudo apt-get update
sudo apt-get install python3
This will install Python on your system, to check if it’s properly installed just execute the command below. If you don’t know if Python is preinstalled on your PC, execute the command below and it will tell you the installed version of Python on your system.
python -V
Below are the other methods to Install Python on your system.
This might not work on every Linux distro, as not every Linux distro comes with its own Software store. But most popular Linux distros nowadays have a software center. And you can easily install Python from the software center(if it’s in the software center).
Just open Software Center or App Center on your Linux system. Search for Python and then click on Install. This will begin the installation of Python on your system and soon you will have it installed.
To install Python, navigate to the official Python site and you will see the latest Python release with two download options.
Click on the download link for any of the above versions for the latest stable release. Then you should be able to see a download dialog box with options to Open and Save. Click on Save to download the archive file.
Navigate to download folder, this is where downloaded Python file is saved. Then double click on the downloaded file to decompress the file. Then when the archive manager completes extraction of compressed Python file, open the extracted Python folder.
In the folder right-click anywhere and click on Open in Terminal. Then in the terminal execute the below commands one by one. If you already have anything preinstalled you can just skip that particular command.
sudo apt-get install build-essential
sudo apt-get install libsqlite3-dev
sudo apt-get install libbz2-dev
These commands install build-essential, Libsqlite3 and Libbz2 on your system.
Now in terminal type cd python X.x.x
with X.x.x being your downloaded Python version. Then type ./configure
and press Enter. This process will take a minute or two to complete. Then after its done just execute the below commands one by one to complete the installation.
./configure
make
make test
sudo make install
After this completes you should have Python installed on your system. If while using python you find an error pip command not found here is how to fix it. To check if Python is properly installed execute the command below.
python -V
Output of this command gives the version of python installed on your system.
In this article, we saw how we can install Python on our Linux system or PC. Python is one of the most popular as well as awesome programming languages. I hope this helps you. Thanks for reading till last.
You can utilize a wide range of tools as a Linux user to keep organized, manage your time, and become… Read More
Have you ever caught yourself in a situation where you need details of an audio/ video media file? When you… Read More
If you have installed Linux alongside windows in the dual boot you might have noticed that every time you boot… Read More
Linux kernel is like the core of the operating system. It's a piece of software that works as a middle… Read More
Python is one of the most popular and easy to learn programming languages. Its a widely used high-level programming language… Read More
With the current sudden rise in demands of GPUs(Graphics Cards), assembling a gaming PC is not a cheap task. And… Read More
Just so that you know we use cookies on our website. Want to know more
read here