Could not start python kernel error

A colleague installed Python on KNIME (WebPortal v 4.6.0) as per the instructions here (on Ubuntu 16.04):
https://www.knime.com/blog/setting-up-the-knime-python-extension-revisited-for-python-30-and-20

When we try an execute a workflow in the browser we get an error, then checking in the logs I see the following (which is the same error but just a little more detailed):

17-Jul-2018 15:32:04.861 INFO [http-nio-8080-exec-38] com.knime.enterprise.server.jobs.WorkflowJobManagerImpl.execute Executing job '/Promotions/Create Firebase token (Create Firebase token 2018-07-17 15.30.28; c300e235-9af4-4037-803c-537a8481ac3d)' (UUID c300e235-9af4-4037-803c-537a8481ac3d)
17-Jul-2018 15:32:04.953 WARNING [KNIME-RMI-syserr-50100] com.knime.enterprise.server.executor.rmi.ProcessOutputConsumer.logOutput ERROR	 KNIME-Worker-103 Node	 Execute failed: Could not start python kernel:
17-Jul-2018 15:32:04.953 WARNING [KNIME-RMI-syserr-50100] com.knime.enterprise.server.executor.rmi.ProcessOutputConsumer.logOutput Error during python installation test: Library numpy is missing
17-Jul-2018 15:32:04.953 WARNING [KNIME-RMI-syserr-50100] com.knime.enterprise.server.executor.rmi.ProcessOutputConsumer.logOutput Library pandas is missing, required minimum version is 0.20.0
17-Jul-2018 15:32:04.953 WARNING [KNIME-RMI-syserr-50100] com.knime.enterprise.server.executor.rmi.ProcessOutputConsumer.logOutput ! See log for details.

I have double checked that the path to the installed Python correct and is in the /opt/knime_server/workflow_repository/config/preferences.epf file. It is almost as though it isn’t reading this at all as I put an in correct (invalid path) in that config file and I still get the same error.
That file contains:

file_export_version=3.0
/instance/org.knime.workbench.core/database_timeout=7200
/instance/org.knime.workbench.core/database_drivers=<path-to-drivers>/single-jar-jdbc-driver.jar;<path-to-drivers/multi-jar-jdbc-driver
/instance/org.knime.python/pythonPath=/opt/anaconda3/bin/python
/instance/org.knime.ext.r.bin/knime.r.home=R

When I check the Linux processes running using ps I do see the path mentioned in the java line.

Any ideas on where I should still be checking?

Hi MikeTA,

Does it help to replace the line

/instance/org.knime.python/pythonPath=/opt/anaconda3/bin/python

by

/instance/org.knime.python2/python3Path=/opt/anaconda3/bin/python

inside your preferences file? (If you want to use Python 2, please use python2Path instead.)

org.knime.python generally refers to our old - and deprecated - Python integration, whereas the blog post you mentioned covers our new integration.

Marcel

Many thanks, this has solved our problem and Python is now working from inside Knime.

1 Like

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