I’m now starting to use Python Script node. The normal python node (like Python view, Python Script, etc) can be run successfully, while Community node (like Python Plot, Open in Python, etc.) failed with the following error:
execute failed: java.lang.runtimeexception: java.io.ioexception: cannot run program “python”: createprocess error=2, the system cannot find the file specified.
Python 3 Conda environment installed on windows10 seems no problem so that normal node run normally,
but why only community node failed? Do I need any further configuring?
The Python community nodes don’t have anything to do with the “normal” Python nodes. They are completely separate and therefore they don’t share configuration.
I tried to set the “path to the local python executable” of Python Scripting like the following:
C:\Users\XXXX\AppData\Local\Continuum\anaconda3\python.exe
Do I need to change other setting here?
I still get some other execute fail error after done the path setting.
Hi,
Thanks.
I checked the log. It contains the error information like the following (attached text).
Sounds like python execution error, but only fails in community nodes.
Should I change the “Python version to use by default” to Python 2 in Preferences - KNIME - Python?
I have already created a python 2 conda environment here,
and set the path of Python Scripting to this new environment.
But I still have community Python node failed with ImportError…
\py2_knime\python.exe is created from KNIME.
So I should change this path to original anaconda python executable place which is:
C:\Users\XXX\AppData\Local\Continuum\anaconda3\python.exe
and change this python environment here to Python2 (currently is Python3).
Why do your backslashes look so strange?
Can you check if this is really the correct path to python2?
Perhaps it is because of the Japanese OS making the backslashes look strange.
I just installed the anaconda to the default path, and as the result the path looks like the following. Probably since I installed the anaconda for “Just me” instead of “All Users”.
After I changed the local python executable path from Python3 to Python2, the error have changed like the following (attached text) when I run the Python Plot with 2D scatter plot template.
Okay, your error message suggests, that the python executable has been found but it fails to execute the script successfully.
You can try the following. Look at the KNIME console error message (you may want to clean the console messages before) and copy the path of the python-file:
ERROR Python Plot 2:35 Traceback (most recent call last):
ERROR Python Plot 2:35 File "C:\Users\XXX\AppData\Local\Temp\analyze3437511062926981065.py", line 3, in <module>
ERROR Python Plot 2:35 from pylab import * ...
Try to execute the script with python: python C:\Users\XXX\AppData\Local\Temp\analyze3437511062926981065.py
Would it be possible to create a minimum example showing these symptoms so we might investigate further. Which Python community nodes are you using and with which functions.
Could it be an option to use the non-community nodes and Python 3.x? (sorry if I missed an information from the thread)
Sorry for confusing you. @niederle
That temp-file does’t really contain the line.
I think the error could be an encoding problem, so that kind of code maybe contained.
I have updated KNIME and the installed plugin to latest version.
I couldn’t successfully run all the Community nodes when I posted the first thread here.
But that has already been solved 4 days ago after I changed the correct Python executable path to Python 2, by the help of replies.
Now the question is about an execution error, and yes, I think the same thing can be done by using of non-community node. ( just interested in solving the particular error)