Introduction:

Latest Python is an easy to learn, powerful programming language. It has efficient high-level data structures and a simple but effective approach to object-oriented programming. Python's simple, 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. Python's elegant syntax and dynamic typing, together with its interpreted nature, make it an ideal language for scripting and rapid application development in many areas on most platforms

When you write programs in Python, you never need to bother about the low-level details such as managing the memory used by your program, etc.

In this article we will show how to install and use Python 3.x in CentOS/RHEL 7, Debian and its derivatives such as Ubuntu (latest LTS version already has latest Python installed) or Linux Mint. Our focus will be installing the core language tools that can be used in the command line.

However, we will also explain how to install the Python IDLE – a GUI-based tool that allows us to run Python code and create standalone functions.

Install Python 3.6 in Linux

At the time of this writing (October 2017), the latest Python 3.x versions available in CentOS/RHEL 7 and Debian 8/9 are 3.4 and 3.5 respectively.

Although we can install the core packages and their dependencies using yum and aptitude (or apt-get), we will explain how to perform the installation from source instead.

Why? The reason is simple: this allows us to have the latest stable release of the language (3.6) and to provide a distribution-agnostic installation method.

Prior to installing Python in CentOS 7, let’s make sure our system has all the necessary development dependencies:

# yum -y groupinstall development
# yum -y install zlib-devel

In Debian we will need to install gcc, make, and the zlib compression / decompression library:

# aptitude -y install gcc make zlib1g-dev

To install Python 3.6, run the following commands:

# wget https://www.python.org/ftp/python/3.6.3/Python-3.6.3.tar.xz
# tar xJf Python-3.6.3.tar.xz
# cd Python-3.6.3
# ./configure
# make
# make install

Now relax and go grab a sandwich because this may take a while. When the installation is complete, use which to verify the location of the main binary:

# which python3
# python3 -V

The output of the above command should be similar to:

latest python

To exit the Python prompt, simply type.

quit()
or
exit()

and press Enter.

Congratulations! Python 3.6 is now installed on your system.

Install Python IDLE in Linux

Python IDLE is a GUI-based tool for Python. If you wish to install the Python IDLE, grab the package named idle (Debian) or python-tools (CentOS).

# apt-get install idle       [On Debian]
# yum install python-tools   [On CentOS]

Type the following command to start the Python IDLE.

# idle
Summary

In this article we have explained how to install the latest Python stable version from source.And to know about node js and installation click here.