2
votes

I use the following code to install h2o-3 in R

# The following two commands remove any previously installed H2O packages for R.
    if ("package:h2o" %in% search()) { detach("package:h2o", unload=TRUE) }
    if ("h2o" %in% rownames(installed.packages())) { remove.packages("h2o") }

    # Next, we download packages that H2O depends on.
    pkgs <- c("methods","statmod","stats","graphics","RCurl","jsonlite","tools","utils")
    for (pkg in pkgs) {
      if (! (pkg %in% rownames(installed.packages()))) { install.packages(pkg) }
    }

    # Now we download, install and initialize the H2O package for R.
    install.packages("h2o", type="source", repos=(c("http://h2o-release.s3.amazonaws.com/h2o/rel-turing/3/R")))
    library(h2o)
    localH2O = h2o.init(nthreads=-1)

    # Finally, let's run a demo to see H2O at work.
    demo(h2o.kmeans)

It shows the following error.

Warning in install.packages : running command '"C:/PROGRA~1/R/R-33~1.1/bin/x64/R" CMD INSTALL -l "C:\Program Files\R\R-3.3.1\library" C:\Users\pintoo\AppData\Local\Temp\RtmpUxsC47/downloaded_packages/h2o_3.10.0.3.tar.gz' had status 65535 Warning in install.packages : installation of package ‘h2o’ had non-zero exit status

Then, as the above code, doesn't install package, and it shows it has been downloaded so i tried installing using the downloaded package using the below code

install.packages("C:/Users/pintoo/AppData/Local/Temp/RtmpUL3Da2/downloaded_packages/h2o_3.10.0.3.tar.gz",
                       repos = NULL, type = "source", dependencies = T)

It produced the below error

Warning in install.packages : running command '"C:/PROGRA~1/R/R-33~1.1/bin/x64/R" CMD INSTALL -l "C:\Program Files\R\R-3.3.1\library" "C:/Users/pintoo/AppData/Local/Temp/RtmpUL3Da2/downloaded_packages/h2o_3.10.0.3.tar.gz"' had status 65535 Warning in install.packages : installation of package ‘C:/Users/pintoo/AppData/Local/Temp/RtmpUL3Da2/downloaded_packages/h2o_3.10.0.3.tar.gz’ had non-zero exit status

MY version :

platform x86_64-w64-mingw32
arch x86_64
os mingw32
system x86_64, mingw32
status
major 3
minor 3.1
year 2016
month 06
day 21
svn rev 70800
language R
version.string R version 3.3.1 (2016-06-21) nickname Bug in Your Hair

Can any one help me out.

What is this non-zero exit status. status 65535 meaning? Non- zero exit status of package means?

1
Why do you have 2 install.packages commands in your code? Did you follow the full instructions on the h2o website? Because your code is missing a bit.phiver
Sorry I installed only once. But I am getting the above error.varun
I tried both installations seperately , but couldn;t get rectifiedvarun
Did you install JDK (oracle.com/technetwork/java/javase/downloads/…) before installing the R package? See: cran.r-project.org/web/packages/h2o/h2o.pdf --> SystemRequirements Java (>= 1.7)majom
Make sure it's the 64-bit JDK. On the page linked above, that would be "Windows x64" instead of "Windows x86".Erin LeDell

1 Answers

3
votes

The error message you gave is for the second of your two install lines; you don't say what happened with the first one.

But, my recommended way to install H2O on R:

install.packages("h2o")

Simple! This will get the latest version from CRAN, and automatically find all the dependencies. The downside is you are a version or so behind the latest. But the product is mature (so being a version back is fine) and development is fairly rapid (so being a version back can sometimes even be better)!

Only use the instructions on the H2O site if you have a good reason to need the latest version. (And I still recommend installing the first time from CRAN, as it is harder to get something wrong, so if that doesn't work, maybe H2O is incompatible with your machine or something like that.)


P.S. The 65535 (i.e. -1) error code is probably a Windows one, and from some googling appears to be a generic one meaning something crashed. If you do pursue it, I'd be suspicious about either access permissions to certain directories, or paths with spaces in them. (IIRC, R used to recommend not installing in directories with spaces in them.)