Issue with KNIME Python Script Node

When running [pm4py workflow]( PM4Py – KNIME Community Hub ) from KNIME hub, the Python Script Nodes execution failed. The error message as follow:

ExecutableNotFound: failed to execute [‘dot’, ‘-Kdot’, ‘-Tsvg:cairo:cairo’], make sure the Graphviz executables are on your systems’ PATH
Traceback (most recent call last):
File “”, line 28, in
File “/opt/anaconda3/envs/py3_knime/lib/python3.9/site-packages/graphviz/files.py”, line 169, in pipe
out = backend.pipe(self._engine, format, data,
File “/opt/anaconda3/envs/py3_knime/lib/python3.9/site-packages/graphviz/backend.py”, line 250, in pipe
out, _ = run(cmd, input=data, capture_output=True, check=True, quiet=quiet)
File “/opt/anaconda3/envs/py3_knime/lib/python3.9/site-packages/graphviz/backend.py”, line 169, in run
raise ExecutableNotFound(cmd)

I tried same script (except knio) with Jupyter notebook. It works well.

The environment info:

KNIME platform 5.5.1

conda version: 24.11.3

python 3: version 3.9.19 installed from KNIME Preference

KNIME Python Integration version: 5.5.1.v202507290925

Python environment configuration: conda

I think you will have to make sure to use a python environment that has the necessary packages installed:

Thank you for your comment. What confuses me is that the same Python environment runs Graphviz normally in Jupyter Notebook, but it prompts that Graphviz is not found when running in the Python script node of the KNIME platform.

@MRAZ where have you selected the conda environment that would contain this Graphviz package? Also it seems you have to install graphviz separately for example on your macOS with “brew install graphviz“.

I toyed around with it and ChatGPT came up with some complex code that I do not fully understand but that provides some fallback solution that produces a result. Maybe you can explore …

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.