Running Jupyter Notebook using Python - Missing Dependencies

Greetings everyone,

I’m trying to run a Jupyter Notebook using Python script node, but usually i face a common problems related to “missing dependencies”. For this time, it’s assuming IPython & nbformat are not installed:

while in fact they are installed in the same environment:

I’ve checked KNIME Python Integration Installation Guide and followed the steps, but it’s still present and having an unstable behavior.
I would truly appreciate your advise to fix this problem, and any tips to avoid such problems “missing dependencies” in future.

Thanks a lot!

@JayR welcome back to the KNIME forum. It says missing dependencies. Which means that the package is there but a dependency could be missing. And you should make sure that your environment is actually used in the python script node.

Hi JayR,

nice that you try that out! It is, however, completely unclear which version of KNIME Analytics Platform you are using. The link you sent is for version 3.7, is that the one you are using? Otherwise, I suggest updating, the current link is KNIME Python Integration Guide
Either way, please have a look at that link on how to set up the Conda Environment Propagation node, and let us know whether there was an issue with the configuration or not. You can confirm that you have the correct version of some package, e.g. nbformat by writing in the Python Script node:

import nbformat
print(nbformat.__version__)

Best regards
Steffen

2 Likes

Thank you all, @mlauber71 & @steffen_KNIME for your response!

Thankfully, I was able to resolve the issues related to “missing dependencies”, however, now I’m encountering another unstable behavior while running Python script node on Knime Server, which throws an incompatible error messages, for example the images below:

  1. Error message (tensorflow):

  2. At the same time, it’s pointing to the below error message (threadpoolctl):

Even though, these two packages are already installed and included in conda propagation node.
So, i started thinking whether the package’s version might be the reason here behind this confusion?

*I’m using Knime version 4.5.1 & Python 3.8

Your time & support is truly appreciated,

Could you send the knime log of the error? That would help regarding the first screenshot.
About the second. Can you verify that in that node you have the correct environment and that the environment is used there has the correct package installed? I don’t think that this is related to the version.
Check within the Python Script node the version via

import sys
print(sys.prefix)

Best regards
Steffen

Thanks @steffen_KNIME for your prompt response!

I’m sorry, but it seems i can’t find the log error message when running it as a job on the server, otherwise, the log error shows this message: “ERROR Python Script 0:21 Execute failed: No module named ‘threadpoolctl’”

Regarding the second image, I’m using the same selected library in conda propagation node (py38), and it already includes the two packages as shown below:
image

image

Could you share the workflow containing the jupyter notebook and just the two nodes Conda Env Propagation and Python Script?

Are you sure the tensorflow version is supported in KNIME?
br

Yes sure, kindly find it attached:
Run_draft_notebook.knwf (12.3 KB)

Regarding the workflow that contains jupyter notebook, i don’t have one; I’m running my notebook through Python script node as shown in the second image above.

Thanks,

@JayR you will have to tell the Python Script node to use the Conda environment you want to use if you do not have it as a default.

There was a lengthy debate about Python on the KNIME server which you might want to check.

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