How To Install Python 3.6 On CentOS 7.6 Using IUS
Installation of Python 3.6 On CentOS 7.6
IUS:
IUS is a yum repository that provides newer versions of select software for RHEL and CentOS
Repository Download Link :
This video explains the method to install python 3.6 On CentOS 7.6 and also making python 3.6 as the default python version.
Installation Process:
Install the IUS repository in order to install the latest versions of the software
[root@linuxhelp1 ~]# yum install yum-utils https://centos7.iuscommunity.org/ius-release.rpm -y
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: centos.excellmedia.net
* epel: epel.dionipe.id
* extras: centos.excellmedia.net
* remi-php73: fr2.rpmfind.net
* remi-safe: fr2.rpmfind.net
* updates: centos.excellmedia.net
base | 3.6 kB 00:00:00
extras | 2.9 kB 00:00:00
mongodb-org-4.2 | 2.4 kB 00:00:00
remi-php73 | 3.0 kB 00:00:00
remi-safe | 3.0 kB 00:00:00
updates | 2.9 kB 00:00:00
(1/4): mongodb-org-4.2/7/primary_db | 18 kB 00:00:00
(2/4): remi-php73/primary_db | 212 kB 00:00:02
(3/4): remi-safe/primary_db | 1.7 MB 00:00:12
(4/4): updates/7/x86_64/primary_db | 5.8 MB 00:00:12
Package yum-utils-1.1.31-52.el7.noarch already installed and latest version
ius-release.rpm | 8.2 kB 00:00:00
.
.
.
Installed:
ius-release.noarch 0:2-1.el7.ius
Complete!
Update the IUS repository data in the cache
[root@linuxhelp1 ~]# yum makecache
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
epel/x86_64/metalink | 6.9 kB 00:00:00
* base: centos.excellmedia.net
* epel: epel.mirror.angkasa.id
* updates: centos.excellmedia.net
base | 3.6 kB 00:00:00
epel | 5.3 kB 00:00:00
extras | 2.9 kB 00:00:00
ius | 1.3 kB 00:00:00
(1/16): base/7/x86_64/filelists_db | 7.3 MB 00:00:17
(2/16): epel/x86_64/filelists_db | 12 MB 00:00:28
.
.
.
.
ius 714/714
ius 714/714
Metadata Cache Created
Verify the default version of python
[root@linuxhelp1 ~]# python -V
Python 2.7.5
Install the latest version of python
[root@linuxhelp1 ~]# yum install python36u -y
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: centos.excellmedia.net
* epel: hk.mirrors.thegigabit.com
* extras: centos.excellmedia.net
* remi-php73: fr2.rpmfind.net
* remi-safe: fr2.rpmfind.net
* updates: centos.excellmedia.net
Package python36u is obsoleted by python3, trying to install python3-3.6.8-10.el7.x86_64 instead
Resolving Dependencies
--> Running transaction check
.
.
.
Installed:
python3.x86_64 0:3.6.8-10.el7
Dependency Installed:
python3-libs.x86_64 0:3.6.8-10.el7 python3-pip.noarch 0:9.0.3-5.el7 python3-setuptools.noarch 0:39.2.0-10.el7
Complete!
Verify the python version
[root@linuxhelp1 ~]# python3 -V
Python 3.6.8
Use the following command to make the python version 3 as the default version
[root@linuxhelp1 ~]# alternatives --install /usr/bin/python python /usr/bin/python3.6 60
Verify the default version of Python on CentOS 7.6
[root@linuxhelp1 ~]# python -V
Python 3.6.8
With this, the method to install Python 3.6 On CentOS 7.6 comes to an end here.
Comments ( 0 )
No comments available