Execution failed: Could not connect to the Python process

Hi everyone.

I have an issue with python node. It doesn’t work. I’ve changed python version, conda version, new environment, knime python in manual with path but nothing works.

It happens with two different computers, and I don’t know how I could continue… I don’t want to use python legacy node.

In another computer with and older version of knime (5.2.0), I can run normally python nodes.

Knime 5.2.3
Python 3.9

Hi @sahernandezg , welcome to the KNIME Community!

Can you expand a little on “doesn’t work”…

[edit: I had asked if you have an error message but I just realised that you have included the error message in the post title ;-)]

Also can you tell us which python node you are referring to, as there are a number of them depending on what extensions you have installed?

Do you mean “Python Script” node?

2 Likes

Sorry.

In fact the error that I’m getting in the Python Script node is :x: Execution failed: Could not connect to the Python process.

image

The only way to make it “works” is setting the Python configuration in knime to Bundle buuuuuut I need to use a library that is not in bundle python environment.

image

@sahernandezg have you configured the nodes to use your specific conda environment

1 Like

If you are setting up a manual environment…

To test this out, I installed python 3.9 into a folder as follows:

c:\apps\python39

and then made sure that python 3.9 was on the path:

In KNIME I set my python folder manually:

It complained about numpy and pandas

so in a command prompt I executed the following:

pip install numpy
pip install pandas

I created a new workflow and on it placed an Empty Table Creator and a Python Script node.

But executing the workflow resulted in the error you are seeing:

So, I waved a magic wand, and produced this script :wink: out of nowhere* :rofl: :

pip install beautifulsoup4       
pip install cloudpickle          
pip install ipython              
pip install matplotlib-base      
pip install markdown             
pip install nbformat             
pip install nltk                 
pip install nomkl                
pip install numpy                
pip install openpyxl             
pip install pandas               
pip install pillow               
pip install plotly               
pip install py4j                 
pip install pyarrow              
pip install python               
pip install python-dateutil      
pip install pytz                 
pip install pyyaml               
pip install requests             
pip install scikit-learn         
pip install scipy                
pip install seaborn              
pip install statsmodels          

and executed that in a command prompt. And when that was done…

:partying_face:

image

2 Likes

Thanks a lot! I even tried creating a new environment with “all knime requirements” but nothing…

You saved me! Have a nice day!

2 Likes

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