Red Hat and Python

See also: Python in 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/libpython3.6m.so.1.0:

$ which python3
/usr/bin/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
    libpython3.6m.so.1.0 => /lib64/libpython3.6m.so.1.0 (0x00007f9ad79f6000)
    ...

Python packages in RHEL

RHEL8 packages:

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

See:

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: https://access.redhat.com/support/policy/updates/rhscl

Support shorter than RHEL support.

Python27 will likely be supported at least until 2020.