Have you already seen our blog post about setting up KNIME & Python? You can find it here.
Please let me know if you already tried the steps described there. I'll gladly help you with some additional information on what to do then.
I tried to follow but I´m not that type of user with sympathy for command prompt...if you know what I´m saying :)
I had stopped at the bat file instruction:
"
If you are using Windows, here’s a sample bat file:
@REM Adapt the directory in the PATH to your system
@SET PATH=C:\tools\Anaconda3\Scripts;%PATH%
@CALL activate py35_knime || ECHO Activating py35_knime failed
@python %*
"
For R integration was pretty easy and as I started to learn Python this year, I would like to try similar tasks using Knime + Python.
Can you guide me?
BTW, I´m using Python 3 with Anaconda in a Windows 8.
fortunately, you won't really have to deal with command prompt stuff, just some text editing. Here's what to do:
1. Find out where you installed Anaconda. E.g., you could use the Windows search to look for "anaconda.exe" which should be located in some directory "...\Anaconda3\Scripts\". That's the directory we need in the next steps.
2. Open up a text editor of your choice, create a new text file and simply paste in the content of the bat file you already posted above (as is - nothing else to do, yet):
@REM Adapt the directory in the PATH to your system
@SET PATH=C:\tools\Anaconda3\Scripts;%PATH%
@CALL activate py35_knime || ECHO Activating py35_knime failed
@python %*
3. In line
@SET PATH=C:\tools\Anaconda3\Scripts;%PATH%
replace C:\tools\Anaconda3\Scripts with the installation directory you found out in step 1. Don't delete the ";%PATH%".
4. Save the file as "py35.bat" (the name isn't really important, just make sure that the file extension is ".bat") wherever you want.
Now you can continue with "Configuring KNIME" in the blog post.
could you elaborate a bit on KNIME crashing with Anaconda Python, please? (E.g. do you remember the name of the conflicting DLLs or any error messages?) That would be very helpful as it seems to be a problem we aren't aware of, so far. Thanks!
In the old KNIME 3.2, the DL4J version we used there had a bug that led KNIME to crash when there were conflicting mkl.dll's on the path. However, this problem was fixed beginning with KNIME 3.3 (at least nobody reported that there was still a problem, and we couldn't reproduce the problem anymore).
However, this is unrelated to the original question of this thread since this is about Keras. For the python Keras setup we recommend to use Anaconda as described by Marcel in earlier posts. There should be not problem with Anaconda and DL4J coexisting in the current version of KNIME.
Your batch file and KNIME preferences look alright. Here's a very simple workflow you can use to test your Python installation. It just computes the mean value of each table row via Python.
Your workflow worked pretty well! Thanks for all your help! Let´s see what I can do now!
Ps: I´ve got an error using Python Plot node from Community Nodes. It is necessary to run Python Server as showed bellow but I´m not sure if this instructions are up to date.
Alternatively, you could also use the "Python View" node (which is part of our regular Python integration) to plot figures. It might involve some more scripting, though.