python learner "no module named sklearn

in the new KNIME version 5.2.5 when I run the python learner I get the error
“No module named ‘sklearn’”. In the version 5.2.0 it works.
Can someone help?
Thanks

@xenis welcome to the KNIME forum. Have you checked your Python extension? Maybe install it again?

Also: would other Python scripts work and only spleen is missing. Maybe you can give us more context and maybe provide the error message and the log.

Hi, thanks for your prompt answer.
The Python Script is working properly. The problem is the Python learner (legacy). The python extension (legacy) has been already installed. But if I run for examble this statement
“from sklearn import tree” I get the error: "No module named ‘sklearn’
Traceback (most recent call last):
File “”, line 1, in
ModuleNotFoundError: No module named ‘sklearn’.
Other Statements like
import pandas as pd #Import Library work well.
Thanks for your feedback in advance

@xenis maybe switch to the new Python nodes. The Python extension already comes with sklearn so no need to work with conda (although you could).

3 Likes