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.
-
Update the system packages.
sudo dnf update -y
-
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.
-
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
-
Extract the archive.
tar -xvzf Python-[***version***].tgz cd Python-[***version***]
-
Configure the build.
./configure --enable-optimizations
-
Build and install Python.
make -j$(nproc) # Compiles using all available CPU cores sudo make altinstall
-
Verify that Python is installed correctly.
python3.12 --version
Configuring Python
After installing Python, you need to explicitly configure the version NiFi will use.
-
Set the Python command in Cloudera Manager.
- Open Cloudera Manager.
- Navigate to the NiFi service configuration.
- Locate the nifi.python.command property.
- Set the value to either
python3.11
orpython3.12
, depending on the version installed.
-
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.