Dear KNIME Community,
I use the Python Script Node in KNIME. The workflow was working before in KNIME 5.4.3., but ever since updating my Mac version to the latest 15.4 version I get the following error log in the console.
ERROR Python Script 3:31 Execute failed: Could not connect to the Python process.
WARN DefaultPythonGateway Python standard output:
WARN DefaultPythonGateway Python standard error: Traceback (most recent call last):
File “/Applications/KNIME 5.3.3.app/Contents/Eclipse/bundling/envs/org_knime_pythonscripting/lib/python3.11/site-packages/numpy/core/init.py”, line 24, in
from . import multiarray
File “/Applications/KNIME 5.3.3.app/Contents/Eclipse/bundling/envs/org_knime_pythonscripting/lib/python3.11/site-packages/numpy/core/multiarray.py”, line 10, in
from . import overrides
File “/Applications/KNIME 5.3.3.app/Contents/Eclipse/bundling/envs/org_knime_pythonscripting/lib/python3.11/site-packages/numpy/core/overrides.py”, line 8, in
from numpy.core._multiarray_umath import (
ImportError: dlopen(/Applications/KNIME 5.3.3.app/Contents/Eclipse/bundling/envs/org_knime_pythonscripting/lib/python3.11/site-packages/numpy/core/_multiarray_umath.cpython-311-darwin.so, 0x0002): Library not loaded: @rpath/libgfortran.5.dylib
Referenced from: /Applications/KNIME 5.3.3.app/Contents/Eclipse/bundling/envs/org_knime_pythonscripting/lib/libopenblas.0.dylib
Reason: tried: ‘/Applications/KNIME 5.3.3.app/Contents/Eclipse/bundling/envs/org_knime_pythonscripting/lib/libgfortran.5.dylib’ (duplicate LC_RPATH ‘@loader_path’), ‘/Applications/KNIME 5.3.3.app/Contents/Eclipse/bundling/envs/org_knime_pythonscripting/lib/libgfortran.5.dylib’ (duplicate LC_RPATH ‘@loader_path’), ‘/Applications/KNIME 5.3.3.app/Contents/Eclipse/bundling/envs/org_knime_pythonscripting/lib/python3.11/site-packages/numpy/core/…/…/…/…/libgfortran.5.dylib’ (duplicate LC_RPATH ‘@loader_path’), ‘/Applications/KNIME 5.3.3.app/Contents/Eclipse/bundling/envs/org_knime_pythonscripting/lib/python3.11/site-packages/numpy/core/…/…/…/…/libgfortran.5.dylib’ (duplicate LC_RPATH ‘@loader_path’), ‘/Applications/KNIME 5.3.3.app/Contents/Eclipse/bundling/envs/org_knime_pythonscripting/bin/…/lib/libgfortran.5.dylib’ (duplicate LC_RPATH ‘@loader_path’), ‘/Applications/KNIME 5.3.3.app/Contents/Eclipse/bundling/envs/org_knime_pythonscripting/bin/…/lib/libgfortran.5.dylib’ (duplicate LC_RPATH ‘@loader_path’), ‘/usr/local/lib/libgfortran.5.dylib’ (no such file), ‘/usr/lib/libgfortran.5.dylib’ (no such file, not in dyld cache)During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “/Applications/KNIME 5.3.3.app/Contents/Eclipse/bundling/envs/org_knime_pythonscripting/lib/python3.11/site-packages/numpy/init.py”, line 130, in
from numpy.config import show as show_config
File “/Applications/KNIME 5.3.3.app/Contents/Eclipse/bundling/envs/org_knime_pythonscripting/lib/python3.11/site-packages/numpy/config.py”, line 4, in
from numpy.core._multiarray_umath import (
File “/Applications/KNIME 5.3.3.app/Contents/Eclipse/bundling/envs/org_knime_pythonscripting/lib/python3.11/site-packages/numpy/core/init.py”, line 50, in
raise ImportError(msg)
ImportError:IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!
Importing the numpy C-extensions failed. This error can happen for
many reasons, often due to issues with your setup or how NumPy was
installed.We have compiled some common reasons and troubleshooting tips at:
https://numpy.org/devdocs/user/troubleshooting-importerror.html
Please note and check the following:
- The Python version is: Python3.11 from “/Applications/KNIME 5.3.3.app/Contents/Eclipse/bundling/envs/org_knime_pythonscripting/bin/python”
- The NumPy version is: “1.26.4”
and make sure that they are the versions you expect.
Please carefully study the documentation linked above for further help.Original error was: dlopen(/Applications/KNIME 5.3.3.app/Contents/Eclipse/bundling/envs/org_knime_pythonscripting/lib/python3.11/site-packages/numpy/core/_multiarray_umath.cpython-311-darwin.so, 0x0002): Library not loaded: @rpath/libgfortran.5.dylib
Referenced from: /Applications/KNIME 5.3.3.app/Contents/Eclipse/bundling/envs/org_knime_pythonscripting/lib/libopenblas.0.dylib
Reason: tried: ‘/Applications/KNIME 5.3.3.app/Contents/Eclipse/bundling/envs/org_knime_pythonscripting/lib/libgfortran.5.dylib’ (duplicate LC_RPATH ‘@loader_path’), ‘/Applications/KNIME 5.3.3.app/Contents/Eclipse/bundling/envs/org_knime_pythonscripting/lib/libgfortran.5.dylib’ (duplicate LC_RPATH ‘@loader_path’), ‘/Applications/KNIME 5.3.3.app/Contents/Eclipse/bundling/envs/org_knime_pythonscripting/lib/python3.11/site-packages/numpy/core/…/…/…/…/libgfortran.5.dylib’ (duplicate LC_RPATH ‘@loader_path’), ‘/Applications/KNIME 5.3.3.app/Contents/Eclipse/bundling/envs/org_knime_pythonscripting/lib/python3.11/site-packages/numpy/core/…/…/…/…/libgfortran.5.dylib’ (duplicate LC_RPATH ‘@loader_path’), ‘/Applications/KNIME 5.3.3.app/Contents/Eclipse/bundling/envs/org_knime_pythonscripting/bin/…/lib/libgfortran.5.dylib’ (duplicate LC_RPATH ‘@loader_path’), ‘/Applications/KNIME 5.3.3.app/Contents/Eclipse/bundling/envs/org_knime_pythonscripting/bin/…/lib/libgfortran.5.dylib’ (duplicate LC_RPATH ‘@loader_path’), ‘/usr/local/lib/libgfortran.5.dylib’ (no such file), ‘/usr/lib/libgfortran.5.dylib’ (no such file, not in dyld cache)The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File “/Applications/KNIME 5.3.3.app/Contents/Eclipse/plugins/org.knime.python3.scripting.nodes_5.4.1.v202501291500/src/main/python/_knime_scripting_launcher.py”, line 57, in
from knime.scripting._backend import (
File “/Applications/KNIME 5.3.3.app/Contents/Eclipse/plugins/org.knime.python3.scripting.nodes_5.4.1.v202501291500/src/main/python/knime/scripting/_backend.py”, line 57, in
import knime.scripting._deprecated._arrow_table as kat
File “/Applications/KNIME 5.3.3.app/Contents/Eclipse/plugins/org.knime.python3_5.4.0.v202411121656/src/main/python/knime/scripting/_deprecated/_arrow_table.py”, line 55, in
import knime._arrow._backend as ka
File “/Applications/KNIME 5.3.3.app/Contents/Eclipse/plugins/org.knime.python3.arrow_5.4.0.v202411121140/src/main/python/knime/_arrow/_backend.py”, line 54, in
import knime._arrow._types as kat
File “/Applications/KNIME 5.3.3.app/Contents/Eclipse/plugins/org.knime.python3.arrow_5.4.0.v202411121140/src/main/python/knime/_arrow/_types.py”, line 55, in
import knime._arrow._dictencoding as kasde
File “/Applications/KNIME 5.3.3.app/Contents/Eclipse/plugins/org.knime.python3.arrow_5.4.0.v202411121140/src/main/python/knime/_arrow/_dictencoding.py”, line 54, in
import numpy as np
File “/Applications/KNIME 5.3.3.app/Contents/Eclipse/bundling/envs/org_knime_pythonscripting/lib/python3.11/site-packages/numpy/init.py”, line 135, in
raise ImportError(msg) from e
ImportError: Error importing numpy: you should not try to import numpy from
its source directory; please exit the numpy source tree, and relaunch
your python interpreter from there.
I reproduced this behavior on another machine, so it seems very likely that there is a direct relation between the Mac OS update and Python breaking in KNIME.
Does anyone have an idea on how I can fix this?