Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
106 lines (73 sloc) 3.48 KB

Red Hat and Python

See also: :ref:`Python in Fedora <python-fedora>`.

Python shipped with RHEL

RHEL Python
RHEL 6 Python 2.6
RHEL 7 Python 2.7
RHEL 8 Python 3.6

How to install Python 3 on Red Hat Enterprise Linux 7 by Rob Terzi (August 2018).

The Python shipped with RHEL is supported as long as RHEL: RHEL Life Cycle.

April 2018, RHEL 7.5 Release Notes: Chapter 54. Deprecated Functionality:

Python 2 has been deprecated: Python 2 will be replaced with Python 3 in the next Red Hat Enterprise Linux (RHEL) major release.

How is Python 2 supported in RHEL after 2020?.

  • no new features will be added to Python 2 in RHEL 7 and earlier.
  • RHEL 8: Python 2.7 AppStream supported until June 2024.

By default on RHEL8, python3 is /usr/libexec/platform-python3.6 which dynamically linked to /lib64/

$ which python3

$ ls -l /usr/bin/python3
/usr/bin/python3 -> /etc/alternatives/python3

$ ls -l /etc/alternatives/python3
/etc/alternatives/python3 -> /usr/bin/python3.6

$ ls -l /usr/bin/python3.6
/usr/bin/python3.6 -> /usr/libexec/platform-python3.6

$ file /usr/libexec/platform-python3.6
/usr/libexec/platform-python3.6: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, ...

$ ldd /usr/libexec/platform-python3.6 => /lib64/ (0x00007f9ad79f6000)

Python packages in RHEL

RHEL8 packages:

  • python3: Python 3.6
  • python2 (Module): Python 2.7


Software Collections

Currently supported (last update: 2018-04-23):

Python version Supported RHEL
Python27 RHEL 7, RHEL 6
Python34 RHEL 7, RHEL 6
Python35 RHEL 7, RHEL 6
Python36 RHEL 7

No longer supported:

  • Python33

Software Collections support:

Support shorter than RHEL support.

Python27 will likely be supported at least until 2020.

You can’t perform that action at this time.