How to Install Python on Linux in an Easier Way
Many top universities around the globe use Python to introduce students to programming. This article will serve as a complete tutorial on How to install python on Linux.
You will find Python already installed. You can check it using the following commands from the terminal
$ python --version
To check the latest version of python 2.x.x :
$ python2 --version
To check the latest version of python 3.x.x :
$ python3 --version
Clearly, it won’t be the latest version of python. There can be multiple methods to install python on a Linux based system and it all depends on your Linux system.
Currently, there are two major Python versions in use – 2 and 3, with 2 rapidly losing ground to 3 since the former is no longer under active development. Since all Linux distributions come with Python 2.x installed.
Download and install python on Linux
To install the latest version from the source code of Python follow the below steps
Download Python Latest Version from python.org
- The first and foremost step is to open a browser and open
https://www.python.org/downloads/source/ - Underneath the Stable Releases find Download Gzipped source tarball (the latest stable release as of now is Python 3.7.4).
You can do all the above steps in a single command
$ wget https://www.python.org/ftp/python/3.7.4/Python-3.7.4.tgz
Install Python 3.7.4 on Linux
To install Python successfully on Linux, Enter the following command to get the prerequisites and other source files
$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo apt-get install -y make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev xz-utils tk-dev
Now we are all ready to unpack the file downloaded from the python official website’
Move to downloads directory using cd downloads in terminal
and then enter the following commands
$ tar xvf Python-3.6.5.tgz
$ cd Python-3.6.5
$ ./configure --enable-optimizations --with-ensurepip=install
$ make -j 8
$ sudo make altinstall
Congrats!..!! You successfully install python on Linux. You can confirm it using the below command.
python --version
Join Telegram Group of Daily Jobs Updates for 2010-2023 Batch: Click Here
If You Want To Get More Daily Such Tech Updates, Career Advice Then Join the Telegram Group From Above Link And Never Miss Update.
Wipro Elite NLTH 2021 Registration has been Started: Click here
Accenture Hiring Freshers of Package 4.5 LPA Across India: Click here
Why You’re Not Getting Response From Recruiter?: Click here
Top 5 High Salary Jobs in India IT Sector 2020: Click here
How To Get a Job Easily: Professional Advice For Job Seekers: Click here
A Leadership Guide For How To Win Hearts and Minds: Click here
COVID-19 Live Tracker India & Coronavirus Live Update: Click here
Career Tips for Freshers: Top 7 Hacks To Land Your Target Job: Click here
Top 5 Best Indian Car Launches In December ahead: Click here
Feel Like Demotivated? Check Out our Motivation For You: Click here
Top 5 Best Mobile Tracking App in 2021 For Mobile & PC: Click here
5 Proven Tips For How To Look Beautiful and Attractive: Click here
Home Workouts During The Lockdown For Fitness Freaks: Click here