Learn to install PYTHON 3.6 on CentOS 7
Python is one of the famous programming language & it has been gaining more popularity especially since the advent of new technologies like Artificial Intelligence, Internet of things etc. It is now being adopted in almost all the industries, all across the globe. What is makes it more popular is the fact that it is one of the easiest programming language to learn & adopt.
If thinking from System Administration point of view, it is used in scripting & for tools puppet, chef etc. Thus making it one of the most sought after skill for a System Administrator. In this tutorial, we will learn to install Python 3.6, which is the latest version of python on Centos 7 machine.
So let’s get going ……..
( Also Read : Complete “Beginners to PRO” guide for GIT Commands )
As Python 3.6 is still not available via default yum repositories, so there are two ways by which we can install Python 3.6 on Centos 7,
1- By compiling from source method
Before we can compile the source packages for python 3.6, we need to make sure that we have all the dependencies installed on our system. To install the required packages , open terminal & execute
$ yum groupinstall “development”
& also install
$ yum install zlib-devel
Once the packages have been installed, we will now download the python source package,
$ wget https://www.python.org/ftp/python/3.6.0/Python-3.6.0.tar.xz
Now extract the package,
$ tar -xJf Python-3.6.0.tar.xz
Next, we will compile the source packages & install it,
$ cd Python-3.6.0
$ make install
After the installation completes, you will have Python 3.6 installed on your Centos 7 machine.
2- By using IUS (Inline with upstream stable) method
Now the second method to install python 3.6 is somewhat not that popular, & is known to very few but it will get the work done. In this method , we will first install IUS. IUS or Inline with Upstream Stable, provides rpm for some newer version of softwares including python 3.6. To install IUS on your Centos machine, execute
$ yum -y install https://centos7.iuscommunity.org/ius-release.rpm
Once the IUS installation has completed, we can use yum to install python on our systems,
$ yum install python36u
This will install python on the system.
Now to launch python on your machine after the installation, open terminal & type
That’s it guys, we are planning to start a learning series for python & will update on that soon. For now please do leave your valuable feedback & queries in the comment box below.