Python script node throws error when i change default prepackage (Knime preference to conda flow variable) . Error prompt is - An exception occured while running the Python kernel. I have version 5.0 now and face this issue quite frequent. default environment is base while working environment is py3_knime as set name.
See log for details
WARN DefaultPythonGateway Python standard output:
WARN DefaultPythonGateway Python standard error: Traceback (most recent call last):
File “C:\Program Files\KNIME\KNIME 5.0\plugins\org.knime.python3.scripting_5.0.0.v202301191514\src\main\python_kernel_launcher.py”, line 63, in
import knime.scripting._deprecated._table as kt
ModuleNotFoundError: No module named ‘knime.scripting’; ‘knime’ is not a package
WARN DefaultPythonGateway Python standard output:
WARN DefaultPythonGateway Python standard error: Traceback (most recent call last):
File “C:\Program Files\KNIME\KNIME 5.0\plugins\org.knime.python3.scripting_5.0.0.v202301191514\src\main\python_kernel_launcher.py”, line 63, in
import knime.scripting._deprecated._table as kt
ModuleNotFoundError: No module named ‘knime.scripting’; ‘knime’ is not a package
I don’t undestand. Are you using a conda environment flow variable via the Conda Propagation node? Or do you use the Python environment built and set via the Preferences?
Can you give as an example workflow?
Did you create a fresh Python environment for that use? Could you please send a screenshot of Preferences -> KNIME -> Python?
What does the script say? (please format code in the forum )
i am using conda environment flow variable via the Conda Propagation node in python scripting node.
Python environment configuration in preference>knime>python is bundled .unable to find the error as python scripting node works well for basic knime preference while shows kernal error when using conda flow variable.
WARN DefaultPythonGateway Python standard output:
WARN DefaultPythonGateway Python standard error: Traceback (most recent call last):
File “C:\Program Files\KNIME\KNIME 5.0\plugins\org.knime.python3.scripting_5.0.0.v202301191514\src\main\python_kernel_launcher.py”, line 63, in
import knime.scripting._deprecated._table as kt WARN DefaultPythonGateway .txt (1.6 KB)
you probably have the package knime installed via pip in the environment used for the Python script node. This currently does not work due to a name clash. You can remove knime in the respective Python environment by executing the command pip uninstall knime in your terminal.
this is showing two packages
…\envs\py3_knime\lib\site-packages\knime-0.11.6.dist-info*
…\envs\py3_knime\lib\site-packages\knime.py
it will remove both …