Installing Python 2.7.18

Install Python 2.7.18 if you use IBM® Operations Analytics Log Analysis on Red Hat® Enterprise (RHEL) Linux 9 or SUSE Linux® Enterprise Server (SLES) 15.

Installing the zlib-devel operating system package

Before you compile Python in RHEL or SLES, verify whether the zlib-devel operating system package is installed:
# rpm -qa | grep zlib-devel
If the package is missing, use the following commands to install the package in each Linux version:
  • Use this command for RHEL: # yum install zlib-devel
  • Use this command for SLES: # zypper install zlib-devel

Installing the openssl operating system package

Before you compile Python in RHEL or SLES, verify whether the openssl operating system package is installed:
# rpm -qa | grep openssl
If the package is missing, use the following commands to install the package in each Linux version:
  • Use this command for RHEL: # yum install openssl-devel
  • Use this command for SLES: # zypper install openssl-devel

Installing Python 2.7.18 in RHEL 9

  1. Download Python 2.7.18.
  2. Extract the downloaded archive:
    tar xzvf Python-2.7.18.tgz
  3. Run the following script to install Python:
    cd Python-2.7.18
    ./configure && make && make altinstall
  4. Create a syslink for Python from Python 2.7.18:
    cd /usr/local/bin
    ln -s python2.7 python

Installing Python 2.7.18 in SLES 15

  1. Install this package before compilation:
    zypper install readline-devel
    zypper install gcc
  2. Download Python 2.7.18.
  3. Extract the downloaded archive:
    tar xzvf Python-2.7.18.tgz
  4. Run the following script to install Python:
    cd Python-2.7.18
    ./configure && make && make altinstall
  5. Create a syslink for Python from Python 2.7.18:
    cd /usr/local/bin
    ln -s python2.7 python