Python Script node problem: Library/DLL not found // Unsatisfactory solution

Hello everyone,
I was hoping you can help me with my problem. I kind of solved it, but my guess is that a better solution is needed, latest for the next upgrade of the software.

I use KNIME 5.1.0, and I could not get the bundled Python environment to work so that I can use the Python Script node.

When I executed the node with a simple

import knime.scripting.io as knio
knio.output_tables[0] = knio.input_tables[0]

I got the following error messages:

Failed to initialize LZ4 libraries. The Columnar Table Backend won’t work properly.
Execute failed: no jnijavacpp in java.library.path: C:\Program Files\KNIME;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Windows\System32\OpenSSH;C:\Program Files (x86)\Novell\ZENworks\bin;C:\Program Files\Graphviz\bin;C:\Users\jschuppi\AppData\Local\Microsoft\WindowsApps;;.
Error loading model settings
Execute failed: Could not initialize class org.knime.python3.scripting.Python3KernelBackend

In the detailed error log, I got, in addition to these lines, the following:

Caused by: java.lang.UnsatisfiedLinkError: C:\Users\jschuppi.javacpp\cache\windows-x86_64\jnijavacpp.dll: Dieses Programm wurde durch eine Gruppenrichtlinie geblockt. Wenden Sie sich an den Systemadministrator, um weitere Informationen zu erhalten

I tried the suggestion here
Problem with Python Script - KNIME Analytics Platform - KNIME Community Forum
to reinstall the Columnar Backend Extension and the Conda Extension, without any change.

I also read this
KNIME Python Integration - KNIME Extensions - KNIME Community Forum
and this
Can’t run Python Script - KNIME Analytics Platform - KNIME Community Forum

My IT department informed me that we have a software restriction policy in place, which is why all files under C:\Users\jschuppi.javacpp\cache\windows-x86_64\ are blocked. This policy will not be changed for me.

Then I copied the file jnijavacpp.dll from the path in the error log into C:\Program Files\KNIME (the first path in the list of paths KNIME uses to search for these .dll files). After a restart, the error message was gone, replaced one identical for the .dll file jnilz4.dll. I also copied that file over to the new path. After another restart, the Python Script node executed without error.

Now I fear that once I make the next program upgrade, I will need to go through the whole process again. Can you advise me if there are any adjustments to my KNIME setup I can make so that this manual solution is a bit more future-proof?

Thanks,
Jan

2 Likes

Hi Jan,
Currently, there is no better way to solve this issue than the setup you have described. We are aware of this problem and a proper solution would require involved changes (and possibly new points of failure). Given that there is a workaround we have not implemented this yet.
You are right, the need for a workaround is not nice and it has to be updated with KNIME AP updates.
I have noted (in our internal ticket) that you ran into this issue to increase the priority for implementing the proper solution. I will let you know of updates but I cannot promise any time frame.

2 Likes

Thank you for your feedback! I just wanted to be sure there was no better solution for me to implement for the colleagues here in the company.
Best regards,
Jan

Did you install KNIME? Maybe the zip version could work.
br

No, I did not reinstall. But if we have to redo the workaround with the 5.2, then I will test this as well!

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