Installing Python 3.8 on SLES 15 for Cloudera Manager 7.7.3

You must install Python 3.8 on all cluster hosts before installing Cloudera Manager and adding services to your cluster.

You can either install the standard Python 3.8 package prepackaged with the SLES 15 operating system or a custom Python 3.8 package in the default operating system location or in a custom location based on your organization's requirements. If you install Python 3.8 in a custom location, then you must point Cloudera Manager to that location either by creating a symbolic link or by adding an environment variable to the Cloudera Manager Agent systemd service definition file.

Perform the following steps on all cluster hosts:
  1. SSH into the host system as a root user.
  2. Run the following command to install Python 3.8:
    zypper install python3.8
  3. Verify the Python version as follows:
    python3.8 -–version
You have completed the Python installation. Skip the remaining steps on this page.
Before installing Python 3.8, you must install the necessary developer tools and packages such as gcc, make, Openssl-devel, Bzip2-devel, Libffi-devel, and Zlib-devel. Run the following command on all cluster hosts to install the necessary dependencies:
zypper install gcc openssl-devel bzip2-devel libffi-devel zlib-devel make libbz2-devel gzip

You may install the custom Python 3.8 package in the standard location, or if required by your organization, in a custom location. Note that some commands are different depending on this choice. If using a custom location, substitute the custom location wherever you see [***CUSTOM-INSTALL-PATH**] in the instructions.

Perform the following steps on all cluster hosts:

  1. SSH into the host system as a root user.
  2. Download Python 3.8 and decompress the package by running the following commands:
    cd /opt
    curl -O https://www.python.org/ftp/python/3.8.12/Python-3.8.12.tgz
    tar -zxvf Python-3.8.12.tgz
  3. Change directory to where you decompressed the Python 3.8 package:
    cd Python-3.8.12.tgz
  4. Run one of the following command to start installing Python 3.8:
    • If you are installing to the standard location, run the following command
      ./configure --enable-shared
    • If you are installing to a custom location, run the following command:
      ./configure --enable-shared --prefix=[***CUSTOM-INSTALL-PATH***]
  5. Build Python 3.8 as follows:
    1. Run the make command to compile the files:
      make
    2. Run the following command to place the compiled files in the default location or in the custom location that you specified using the --prefix option:
      make altinstall
    3. Copy the shared compiled library files (libpython3.8.so) to the /lib64/ directory:
      cp --no-clobber ./libpython3.8.so* /lib64/
      The --no-clobber option is used to prevent overwriting of files.
    4. Change the permissions of the libpython3.8.so files as follows:
      chmod 755 /lib64/libpython3.8.so*
  6. If you see the error while loading shared libraries: libpython3.8.so.1.0: cannot open shared object file: No such file or directory error, then run the following command:
    export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/