Get the Latest Python on Linux

Windows Articles

How to increase privacy in Windows 10.

Hello! Without a doubt the time of use of electronic devices has increased lately. Indeed, with the limitations imposed by the COVID-19...

How to install Java 15 on OpenSUSE 15.2?

Recently Java 15 has been released with interesting new features in the accounting field and introducing many security patches. In spite of...

How to install Redis on CentOS 8?

Hello, friends in this post, we will show you how to install Redis on CentOS 8 As we well...

How to enable and disable startup applications in Windows 10

Hello! Windows 10 is an attractive and very easy to use system. However, some criticism has come for being too "heavy". That...

How to install Oracle Java 15 on Ubuntu 20.04 / 18.04?

Hello, friends. We know that Java is one of the most popular programming languages and now it's version 15. So in this...

Python is one of the most popular programming and scripting languages for all purposes. There are a number of tools you are working with that depends on Python. It’s so common and powerful that all the Linux distros come up with a pre-installed version of Python.

Today, let’s have a look at getting the latest version of Python in our Linux distro.

Installing Python

There are 2 available ways you can get Python – from the repo of the distro and building from the source. Some distros like Ubuntu, Debian, and Fedora etc. comes up with Python in their software repository. In the case of others, it’s the best to install Python from source.

Installing from distro repository

Run the following commands according to your Linux distro –

  • Ubuntu
sudo apt update && sudo apt upgrade -y

# Python 3
sudo apt install python3
OR
sudo apt install python3.7

# Python 2
sudo apt install python

  • Debian
sudo apt-get install python3
  • OpenSUSE
sudo zypper install python3
  • Fedora
sudo dnf install python37
  • Arch Linux
sudo pacman -S python

Installing Python from source

At first, make sure that your system has all the required dependencies to build Python from source –

  • Ubuntu
sudo apt install make build-essential libssl-dev zlib1g-dev libbz2-dev

 

 

  • Debian
sudo apt-get install make build-essential libssl-dev zlib1g-dev libbz2-dev
  • OpenSUSE
sudu zypper install -t pattern devel_C_C++
  • CentOS
sudo yum update
sudo yum -y groupinstall development
sudo yum -y install zlib-devel

Now, download the latest source package of Python –

wget https://www.python.org/ftp/python/3.7.0/Python-3.7.0.tar.xz

Extract the archive –

tar -xvf Python-3.7.0.tar.xz

Build the source –

./configure --enable-optimizations --with-ensurepip=install
make -j4
make test

Install the package –

sudo make altinstall

Testing Python

Depending on the version you installed, run the following command(s) to verify that Python is available system-wide.

python --version
OR
python3 --version

Voila! Python is installed successfully!

More articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest article

How to increase privacy in Windows 10.

Hello! Without a doubt the time of use of electronic devices has increased lately. Indeed, with the limitations imposed by the COVID-19...

How to install Java 15 on OpenSUSE 15.2?

Recently Java 15 has been released with interesting new features in the accounting field and introducing many security patches. In spite of...

How to install Redis on CentOS 8?

Hello, friends in this post, we will show you how to install Redis on CentOS 8 As we well...

How to enable and disable startup applications in Windows 10

Hello! Windows 10 is an attractive and very easy to use system. However, some criticism has come for being too "heavy". That...

How to install Oracle Java 15 on Ubuntu 20.04 / 18.04?

Hello, friends. We know that Java is one of the most popular programming languages and now it's version 15. So in this...
x