The Python 2 interpreter is not available on RHEL 8 / CentOS 8 default installation. However, it can be installed with a single dnf command.

In this tutorial you will learn:
  • How to install Python 2 on RHEL 8 / CentOS 8.
  • How to to check Python version on RHEL 8 / CentOS 8.
Python 2 installation on Red Hat Enterprise Linux 8.
Python 2 installation on Red Hat Enterprise Linux 8.

Software Requirements and Conventions Used

Software Requirements and Linux Command Line Conventions
Category Requirements, Conventions or Software Version Used
System RHEL 8 / CentOS 8
Software Python 2
Other Privileged access to your Linux system as root or via the sudo command.
Conventions # - requires given linux commands to be executed with root privileges either directly as a root user or by use of sudo command
$ - requires given linux commands to be executed as a regular non-privileged user

How to install python 2 on RHEL 8 / CentOS 8 step by step instructions


SUBSCRIBE TO NEWSLETTER
Subscribe to Linux Career NEWSLETTER and receive latest Linux news, jobs, career advice and tutorials.


  1. To install package Python 2 on RHEL 8 / CentOS 8 execute the following dnf command:
    # dnf install python2
    
  2. Use --version option to check the installed Python version. For example:
    # python2 --version
    Python 2.7.15
    
ARE YOU LOOKING FOR A LINUX JOB?
Submit your RESUME, create a JOB ALERT or subscribe to RSS feed on LinuxCareers.com.
LINUX CAREER NEWSLETTER
Subscribe to NEWSLETTER and receive latest news, jobs, career advice and tutorials.
DO YOU NEED ADDITIONAL HELP?
Get extra help by visiting our LINUX FORUM or simply use comments below.