Installing Python 3.8 for Cloudera Manager 7.7.3

Python 3.8 is required for using 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.

Cloudera Manager 7.7.3-CHF1 is supported only on the following operating systems:
  • RHEL 8.4
  • RHEL 8.6
  • RHEL 7.9

You can either install the standard Python 3.8 package prepackaged with the RHEL 8 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.

If you are using RHEL 8, Cloudera recommends that you uninstall Python 2.7, if it is present on your hosts. If you are using RHEL 7, do not uninstall Python 2.7.

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:
    yum 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:
yum install gcc openssl-devel bzip2-devel libffi-devel zlib-devel -y

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 /opt/Python-3.8.12
  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/

If you installed Python 3.8 in a standard location, you can stop here. If you installed Python 3.8 in a custom location using the --prefix option, follow the steps in the next section for providing the custom location to Cloudera Manager.