Installing and configuring Python

You must install Python 3 on each machine where NiFi will run. The minimum supported version is Python 3.11, but Cloudera recommends installing and configuring Python 3.12.

Installing Python on RHEL8

Python 3.11

Python 3.11 can be installed directly using the dnf package installer.

  1. Update the system packages.
    sudo dnf update -y
  2. Install Python 3.11.
    sudo dnf install python3.11

Python 3.12

Cloudera recommends using the Python 3.12 interpreter for the installation. Since Python 3.12 is not directly available through the default dnf package installer on RHEL8, you will have to download and build it from source.

  1. Go to the official Python downloads page and download the desired Python 3.12 version.
    curl -O https://www.python.org/ftp/python/[***version***]/Python-[***version***].tgz

    For example: curl -O https://www.python.org/ftp/python/3.12.8/Python-3.12.8.tgz

  2. Extract the archive.
    tar -xvzf Python-[***version***].tgz
    cd Python-[***version***]
  3. Configure the build.
    ./configure --enable-optimizations
  4. Build and install Python.
    make -j$(nproc) # Compiles using all available CPU cores
    sudo make altinstall
  5. Verify that Python is installed correctly.
    python3.12 --version

Configuring Python

After installing Python, you need to explicitly configure the version NiFi will use.

  1. Set the Python command in Cloudera Manager.

    1. Open Cloudera Manager.
    2. Navigate to the NiFi service configuration.
    3. Locate the nifi.python.command property.
    4. Set the value to either python3.11 or python3.12, depending on the version installed.
  2. Save the changes and restart the NiFi service to apply the configuration.

After completing the Python installation, proceed to install and configure JDK 21 on each machine where NiFi and NiFi Registry will run.