I’m trying to change the path for R Home in KNIME to a newer version of R however with all the versions I’ve tried I get the error " . . . contains an invalid R executable!". I’ve tried a few versions with the same result. Is there any way to configure KNIME to use the most recent version of R? Thanks!
Could you give us more details? Which operating system do you use? Windows or MacOS or Linux?
Here are a few hints about installing R together with KNIME:
If you have MacOS you would need to manually install RServe and maybe some compiling tools.
Thanks for the quick reply! The machine I’m having issues with is running Windows 10, KNIME version 3.6.2. After much head scratching, I decided to try the same procedure of installing a newer version of R and pointing KNIME to the new R Home directory on another similar Windows machine with Windows 10, and a slightly older version of KNIME (3.5.3). This time I was successful!
Digging a bit deeper I think one of the original issues is I do not have native administrative rights on the machine I’m having issues with. I went back and installed R in the program files directory with an administrative account and started KNIME as an administrator, however this still did not resolve the original error. I might see if I can downgrade to a previous version of KNIME and see if that helps, otherwise since I have this working on at least one machine I might call it quits unless anyone else has other suggestions to try.
Do you habe the latest version of RServe installed? You will need that.
Yes, I have Rserve installed, same error in KNIME.
can you please post you KNIME log, it should tell us more about the error.
Below is the log for when I attempted to change the R Home path in KNIME. I verified I was able to change other settings and was able to change buffer size limit parameter. I’m not sure why I’m getting an error Rserver is not installed, I verified the Rserver package was installed through Rstudio. I also re-installed the Rserve package and restarted KNIME with the same result.
2018-11-12 13:55:57,437 : DEBUG : R Output Reader : RBinUtil : : : External Rscript process output:
2018-11-12 13:55:57,438 : DEBUG : R Error Reader : RBinUtil : : : External Rscript process error output: Error in packageVersion(“Rserve”) : package ‘Rserve’ not foundCalls: append -> paste -> packageVersionExecution halted
2018-11-12 13:56:19,486 : DEBUG : KNIME-ConfigurationArea-Checker : ConfigurationAreaChecker : : : Configuration area is at C:\Program Files\KNIME\configuration
2018-11-12 13:56:19,493 : DEBUG : KNIME-ConfigurationArea-Checker : ConfigurationAreaChecker : : : Locked file in configuration area “C:\Program Files\KNIME\configuration\org.knime.core\mwilliams.lock”
2018-11-12 13:56:19,497 : DEBUG : KNIME-ConfigurationArea-Checker : ConfigurationAreaChecker : : : Configuration area check completed in 0.0s
2018-11-12 13:59:31,875 : DEBUG : R Output Reader : RBinUtil : : : External Rscript process output:
2018-11-12 13:59:31,875 : DEBUG : R Error Reader : RBinUtil : : : External Rscript process error output:
2018-11-12 13:59:32,081 : DEBUG : R Output Reader : RBinUtil : : : External Rscript process output:
2018-11-12 13:59:32,081 : DEBUG : R Error Reader : RBinUtil : : : External Rscript process error output:
I would deinstall all R packages from KNIME as there are
- R integration for KNIME
- R Scripting extension (third party extension)
- R Binaries (for Windows)
I would then make sure that you have the latest R Version (3.5.1) on your computer, that you can do something with it via RStudio.
Install the latest version of RServe (1.8-6)
that you can load the RServe library in R, like:
Rserve(args = “–vanilla”)
then you should just reinstall the ‘official’ R integration for KNIME and point the preferences to the location of your R version. Press apply and make sure there are no error messages like ‘no RServe found’.
Not sure if a clean start of KNIME might also help
I’m having the same issue. How do you “I would deinstall all R packages from KNIME as there are”?
I mean the up to three KNIME extensions about R as mentioned before. I would deinstall them an install them again. Maybe first only using the “R Scripting extension”
From my experience the most important thing is to update RServe to the latest version (1.8-6). You will have to compile the package yourself (depending on your platform) since there is no binary version ready for download (yet).
Download the .tar file and use it to install a package from Archive and install it via RStudio:
You will need additional tools in order to compile the packages. For MacOS these are:
For Windows you have Rtools
For RServe on Windows there are special hints. With the latest version I have not encountered any problems between R and KNIME on Windows but if you still have problems it might be worth checking this out:
And as mentioned in another post when compiling on Windows make sure you do not use too complicated paths for your version of RTools:
Yes I know it is a bit of a puzzle but you will have the full power of R at your disposal within KNIME in the end.
I had this problem. I looked at the KNIME source code to find the solution. You need to have the packages
“Rserve” and “Cairo” installed before KNIME will recognize the installation.
KNIME runs a script to check for the R version, and for the presence of these packages when you access the preferences dialog. So you can log in as root and install those packages with install.packages() and then it works ok.
I ran Rserve() function in RStudio and after that KNIME changed R Home directory.