Installing Python 3 on Oracle Linux 7.6

There are several ways to install python 3 on Oracle Linux 7 systems. You can either perform an installation using an EPEL (Extra Packages for Enterprise Linux) repository or the Software Collection Library (SCL) which requires that you perform other types of commands. However, on this post I am going to install from the the Oracle Linux 7 latest repository which is also another method besides the two previously mentioned. Also the OS will be an Oracle Linux 7.6 that comes installed by default, the version 2.7 of Python is different from Oracle Linux 7.7 that comes with Python in its version 3. Once the Python 3 has been installed you can check the version starting the Python3 utility . For futher information about each method I do recommend you to check up the Oracle Documentation for Python that you can find in the reference below:

https://yum.oracle.com/oracle-linux-python.html

So to perform the installation from the Oracle Linux 7 latest repository you So to perform the installation from the Oracle Linux 7 latest repository you simply run the command “yum install -y python3”:



oraclelinux7]# python --version
Python 2.7.5


oraclelinux7]# yum install -y python3
Loaded plugins: langpacks, ulninfo
Resolving Dependencies
--> Running transaction check
---> Package python3.x86_64 0:3.6.8-13.0.1.el7 will be installed
--> Processing Dependency: python3-libs(x86-64) = 3.6.8-13.0.1.el7 for package: python3-3.6.8-13.0.1.el7.x86_64
--> Processing Dependency: python3-pip for package: python3-3.6.8-13.0.1.el7.x86_64
--> Processing Dependency: python3-setuptools for package: python3-3.6.8-13.0.1.el7.x86_64
--> Processing Dependency: libpython3.6m.so.1.0()(64bit) for package: python3-3.6.8-13.0.1.el7.x86_64
--> Running transaction check
---> Package python3-libs.x86_64 0:3.6.8-13.0.1.el7 will be installed
---> Package python3-pip.noarch 0:9.0.3-7.el7_8 will be installed
---> Package python3-setuptools.noarch 0:39.2.0-10.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

============================================================================================================================================================================================================
 Package                                               Arch                                      Version                                                Repository                                     Size
============================================================================================================================================================================================================
Installing:
 python3                                               x86_64                                    3.6.8-13.0.1.el7                                       ol7_latest                                     69 k
Installing for dependencies:
 python3-libs                                          x86_64                                    3.6.8-13.0.1.el7                                       ol7_latest                                    7.0 M
 python3-pip                                           noarch                                    9.0.3-7.el7_8                                          ol7_latest                                    1.8 M
 python3-setuptools                                    noarch                                    39.2.0-10.el7                                          ol7_latest                                    628 k

Transaction Summary
============================================================================================================================================================================================================
Install  1 Package (+3 Dependent packages)

Total download size: 9.4 M
Installed size: 48 M
Downloading packages:
(1/4): python3-3.6.8-13.0.1.el7.x86_64.rpm                                                                                                                                           |  69 kB  00:00:00     
(2/4): python3-libs-3.6.8-13.0.1.el7.x86_64.rpm                                                                                                                                      | 7.0 MB  00:00:00     
(3/4): python3-pip-9.0.3-7.el7_8.noarch.rpm                                                                                                                                          | 1.8 MB  00:00:00     
(4/4): python3-setuptools-39.2.0-10.el7.noarch.rpm                                                                                                                                   | 628 kB  00:00:00     
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                                       9.6 MB/s | 9.4 MB  00:00:00     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : python3-libs-3.6.8-13.0.1.el7.x86_64                                                                                                                                                     1/4 
  Installing : python3-setuptools-39.2.0-10.el7.noarch                                                                                                                                                  2/4 
  Installing : python3-pip-9.0.3-7.el7_8.noarch                                                                                                                                                         3/4 
  Installing : python3-3.6.8-13.0.1.el7.x86_64                                                                                                                                                          4/4 
  Verifying  : python3-3.6.8-13.0.1.el7.x86_64                                                                                                                                                          1/4 
  Verifying  : python3-libs-3.6.8-13.0.1.el7.x86_64                                                                                                                                                     2/4 
  Verifying  : python3-setuptools-39.2.0-10.el7.noarch                                                                                                                                                  3/4 
  Verifying  : python3-pip-9.0.3-7.el7_8.noarch                                                                                                                                                         4/4 

Installed:
  python3.x86_64 0:3.6.8-13.0.1.el7                                                                                                                                                                         

Dependency Installed:
  python3-libs.x86_64 0:3.6.8-13.0.1.el7                              python3-pip.noarch 0:9.0.3-7.el7_8                              python3-setuptools.noarch 0:39.2.0-10.el7                             

Complete!
oraclelinux7]# 




oraclelinux7]# python --version
Python 2.7.5
[root@localhost oracle]# python
Python 2.7.5 (default, Nov 27 2019, 09:57:45) 
[GCC 4.8.5 20150623 (Red Hat 4.8.5-39.0.1)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> quit
Use quit() or Ctrl-D (i.e. EOF) to exit
>>> 

oraclelinux7]# python3
Python 3.6.8 (default, Nov 27 2019, 14:21:59) 
[GCC 4.8.5 20150623 (Red Hat 4.8.5-39.0.1)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> 

Related posts

Leave a Comment