Reputation: 15
I'm learning how to use h2o but I can't seem to get the latest version to work in Jupyter Notebooks. I can manage to get it running with a very old version though (about 1 year and a few months old). I keep getting stuck when I try to initialise it
import h2o
h2o.init()
I found there were several versions of h2o that I could download online. Here's what I tried:
I had first downloaded h2o from here (https://anaconda.org/anaconda/h2o) but it could not find the module when I tried importing it over in Jupyter (I installed the package and opened up Jupyter with the same environment [Python 3.6]). This was fixed when I downloaded the additional h2o-py package (https://anaconda.org/anaconda/h2o-py). I could run H2O with these two packages installed, its just that its a pretty old version (3.18.0.2).
Deleting the h2o and leaving only the h2o-py gives me this error:
H2OStartupError: Cannot start local server: h2o.jar not found.
I also tried getting the latest version from the h2o website (http://docs.h2o.ai/h2o/latest-stable/h2o-docs/downloading.html) - I am assuming this is the one. I followed the downloading instructions for both pip and conda but neither worked. I kept getting the H2O Connection Error and CalledProcess Error when I tried to initialise h2o.
H2OConnectionError: Could not establish link to the H2O cloud http://localhost:54321 after 5 retries
CalledProcessError: Command '['/usr/bin/java', '-version']' returned non-zero exit status 2.
I tried this in combination with h2o-py, h2o and h2o together (latest one from the website), and just the h2o package alone but nothing is working. So far, the only thing that I got working was the h2o in combination with h2o-py, both of which are the older versions of h2o.
Is there something that I'm missing?
=======================================================================
TL;DR
With packages:
1) h2o and h2o-py - works, but is an older version
2) h2o only - cannot find module when importing
3) h2o-py only - H2OStartupError: h2o.jar not found
4) h2o (latest version) and others (h2o (old version) or h2o-py)- Connection Error when initialising
5) all three packages together - Cannot find module when importing
Upvotes: 1
Views: 2746
Reputation: 3671
The "java -version" command not working is definitely something you need to resolve.
CalledProcessError: Command '['/usr/bin/java', '-version']' returned non-zero exit status 2.
H2O-3 uses Java underneath the hood to do it's work. I recommend installing Java 8 on your host.
Start debugging this by running java -version
by hand in a terminal and see if that helps pinpoint the problem. Chances are you just need to install java itself.
Upvotes: 2
Reputation: 268
The officially recommended way to install the conda package is
conda install -c h2oai h2o
I would start with a fresh environment that doesn't contain the other h2o packages you tried. Note that h2o-py
is not an official h2o package and it's not recommended to ever use it.
Upvotes: 0