Can't run Python Script

I’m trying to run this example workflow:

I’m running the Bundled Environment and Columnar Backend. The Python Script node doesn’t seem to start.

Here’s what I have installed:


I’m totally stumped. Can some please help?

Hi @rfeigel,

This is strange. Can you please try to execute the node (not in the configuration dialog) and check the KNIME Log. There should be more information on what is going wrong.

3 Likes

I updated to v. 4.7.4 and the problem resolved itself. I have a related question. Where is the knime.scripting.io package stored? I manually created a Python environment per the package list per these instructions:
KNIME Python Integration Guide

It doesn’t have a knime-scripting.io package, but it works fine. I’m confused.

I found the location of the bundled environment, but I’m still puzzled why the manually created environment without the script.io works.

Hi @rfeigel,
The knime.scripting.io package is located in the plugin “org.knime.python3.scripting” in the “plugin” folder of the KNIME installation. We put it on the PYTHONPATH when you use Python from KNIME. It is not released as a separately installable package because it is only useful when running Python from KNIME.
You can find the source here: GitHub - knime-python.

3 Likes

Thanks for the reply. Is the following correct: “If I use a Conda environment with the Python Script node, Kniime behind the scene grabs the knime.scripting.io package?”

I would not formulate it like that. I would go with: “For Python execution with the 'Python Script” node (using any Python installation - usually within a Conda environment) KNIME behind the scene provides the knime.scripting.io package by adding the path to it to the PYTHONPATH."

3 Likes

Your description is certainly more elegant. Could someone add this information to the documentation? It would be very helpful.

2 Likes

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