How To Install Python 3.6 on Linux Using Terminal Interface

In this article, I am going to explain how to install Python 3.6 on Linux using the terminal interface. But, before we proceed first let’s see what is Python and what is the use of Python. Python is an interpreted, object-oriented, high-level programming language with dynamic semantics. Its high-level built-in data structures, combined with dynamic typing and dynamic binding, makes it very attractive for Rapid Application Development, as well as for use as a scripting or glue language to connect existing components together. Python is simple and easy to learn syntax emphasizes readability and therefore reduces the cost of program maintenance. Python supports modules and packages, which encourages program modularity and code reuse.

The Python interpreter and the extensive standard library are available in source or binary form without charge for all major platforms and can be freely distributed.

How To Install Python 3.6 on Linux Using Terminal Interface

How To Install Python 3.6 on Linux Using Terminal Interface

To install Python 3.6 on Linux

  • Check to see if Python is already installed on your system:
    $ python --version

If Python is not installed, install Python with your distribution’s package manager. The command and package name vary:

  • On Debian derivatives such as Ubuntu, use APT:
    $ sudo apt-get install python3
  • On Red Hat and derivatives, use yum:
    $ sudo yum install python
  • On SUSE and derivatives, use zypper:
    $ sudo zypper install python3

Also Read – How To Install PIP (Python Packages Management System) in Linux

Install Python 3.6 on Linux (Ubuntu 18.04)

Before we proceed first let’s update old repositories to their current version.

Open the Terminal and execute the command “sudo apt-get update

[email protected]:~$ sudo apt-get update *// Starting repositories update //*
[sudo] password for umesh: 
Get:1 http://security.ubuntu.com/ubuntu xenial-security InRelease [117 kB]     
Hit:2 http://us.archive.ubuntu.com/ubuntu xenial InRelease                     
Get:3 http://us.archive.ubuntu.com/ubuntu xenial-updates InRelease [108 kB]    
Get:4 http://us.archive.ubuntu.com/ubuntu xenial-backports InRelease [116 kB]  
Fetched 341 kB in 4s (152 kB/s)    
Reading package lists... Done *// Updating repositories finished //*

Also Read- Top Basic Linux Commands for Beginners

To Install Python 3.6 On Linux Download The Package

If you have not to download Python yet then download the latest version of the Python 3.6.5 package, Click here to download the Package.

Once the download gets complete follow the steps to proceed further. You can verify this using terminal or graphical way.

[email protected]:~$ cd Downloads/
[email protected]:~/Downloads$ ls
Python-3.6.5.tar.xz   *// Downloaded Python 3.6.5 package name //*

Installing Python 3.6.5 package

To proceed with installation first we have to extract the downloaded package by executing the following command on the terminal window.

ma[email protected]:~/Downloads$ tar -xvf Python-3.6.5.tar.xz   *// Extracting the downloaded package //*
Output:
[email protected]:~/Downloads$ ls
Python-3.6.5 Python-3.6.5.tar.xz *// File successfully extracted //*

As you can see in the above package is extracted successfully. Let’s move on to script configuration

Also Read- How to Generate SSH Keys on Windows 10 with Ubuntu.

Configuring Python 3.6.5 Script

Open the Python-3.6.5 directory (extracted file) and use “configure” command to configure it.

[email protected]:~/Downloads$ cd Python-3.6.5/
[email protected]:~/Downloads/Python-3.6.5$ ls
aclocal.m4    Doc         LICENSE          Objects   pyconfig.h.in
config.guess  Grammar     Mac              Parser    Python
config.sub    Include     Makefile.pre.in  PC        README
configure     install-sh  Misc             PCbuild   setup.py
configure.ac  Lib         Modules          Programs  Tools
[email protected]:~/Downloads/Python-3.6.5$ ./configure

Now you have successfully completed the script configuration.

Completing Python 3.6.5 Installation

To complete the installation process we will use the following commands:

  • sudo make
  • sudo make install
[email protected]:~/Downloads/Python-3.6.5$ sudo make
ma[email protected]:~/Downloads/Python-3.6.5$ sudo make install *// Final command //*

We have successfully installed the Python 3.6.5 package on Ubuntu 17.10. Open a command prompt or shell and run the following command to verify that Python installed correctly:

$ python3 --version Python 3.6.5

Also Read- How to Install Ubuntu on Windows 10.

That’s all, In this article, we have explained How To Install Python 3.6 on Linux Using Terminal Interface. I hope you enjoy this article. If you like this article, then just share it and then do subscribe to email alerts for Linux, Windows, macOS, Android, Internet, Firewall and Security, CCTV tutorials. If you have any questions or doubts about this article, please comment.

Share this:

ITSmarttricks Team

This is Mangesh Dhulap the Founder and Editor of IT SMART TRICKS have 6+ years of Industrial Experience. We expect from our visitors to like, share, and comment on our posts.

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.