Created 05-07-2018 01:40 PM
I have sparkR
and R
installed on my Ubuntu machine. When I try to launch sparkR
through the terminal, I get the following error:
Error in eval(expr, envir, enclos) : could not find function ".getNamespace" Error: unable to load R code in package ‘SparkR’ During startup - Warning message: package ‘SparkR’ in options("defaultPackages") was not found
Could you please help me fix this?
Created 05-07-2018 07:57 PM
I think answer to your issue is described here:
https://stackoverflow.com/questions/15809414/could-not-find-function-getnamespace
Here is the brief of it:
"The .getNamespace
function is part of R 3.0.0. The warning message states that the package you installed was built for R 3.0, not 2.15. The package is trying to use the .getNamespace
function, but does not find it as it is not part of R 2.15. You can either upgrade to R 3.0 (which seems to be a bit experimental right now) or install the R 2.xx version of the package."
*** If you found this answer addressed your question, please take a moment to login and click the "accept" link on the answer.
Created 05-07-2018 07:57 PM
I think answer to your issue is described here:
https://stackoverflow.com/questions/15809414/could-not-find-function-getnamespace
Here is the brief of it:
"The .getNamespace
function is part of R 3.0.0. The warning message states that the package you installed was built for R 3.0, not 2.15. The package is trying to use the .getNamespace
function, but does not find it as it is not part of R 2.15. You can either upgrade to R 3.0 (which seems to be a bit experimental right now) or install the R 2.xx version of the package."
*** If you found this answer addressed your question, please take a moment to login and click the "accept" link on the answer.
Created 05-08-2018 05:43 AM
Thank you Felix, I upgraded R 2.14.1 to R 3.2.5 using below commands and I could successfully launched sparkR through terminal.
Add PPA: sudo add-apt-repository ppa:marutter/rrutter
Update ubuntu for upgrade: sudo apt-get update
Upgrade R (This is a generic ubuntu command) sudo apt-get upgrade
Created 05-08-2018 05:46 AM
However when I try to launch R, I get the following error:
"Error in loadNamespace(name) : there is no package called ‘SparkR’
During startup - Warning messages:
1: In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, :
there is no package called ‘SparkR’
2: package ‘SparkR’ in options("defaultPackages") was not found"
Do I need to install an additional 'sparkR' package within R?