Search code examples
pythonapache-nifi

How to add additional libraries in ExecuteStreamCommand in Nifi?


I'm not able to run a Python script from ExecuteStreamCommand.

These are the processor properties: Command arguments: /home/directory/test.py Command path: /bin/python3 Working directory: /home/directory

Error message: Traceback (most recent call last): File "/home/test.py", line 1, in import nipyapi ModuleNotFoundError: No module named 'nipyapi'


Solution

  • The way that I am able to get ExecuteStreamCommand processor to run python scripts with imported modules is to install the imported modules on the actual machine itself. Therefore, this means running pip or pip3 install {insert module name} on the command prompt for each system that this processor is running on.