KOB
KOB

Reputation: 4545

pip is successfully installing h2o4gpu, still getting 'ImportError: No module named h2o4gpu'

I am attempting to install the h2o4gpu Python module as per the instructions listed here: https://github.com/h2oai/h2o4gpu/issues/464

pip says that it successfully installed all packages, including h2o4gpu-0.1.0.

However I then still get

    import h2o4gpu
ImportError: No module named h2o4gpu

and

kevin@Ubuntu-XPS:~/Downloads$ pip show tensorflow-gpu
Name: tensorflow-gpu
Version: 1.9.0
Summary: TensorFlow is an open source machine learning framework for everyone.
Home-page: https://www.tensorflow.org/
Author: Google Inc.
Author-email: [email protected]
License: Apache 2.0
Location: /usr/local/lib/python2.7/dist-packages
Requires: grpcio, mock, protobuf, enum34, gast, wheel, absl-py, backports.weakref, termcolor, six, numpy, tensorboard, setuptools, astor
kevin@Ubuntu-XPS:~/Downloads$ pip show h2o4gpu
kevin@Ubuntu-XPS:~/Downloads$ 

thus showing that pip acknowledges that tensorflow-gpu is installed, but not h2o4gpu.

I am running Ubuntu 18.04 - could the cause of this be that h2o4gpu isn't yet supported on version 18? import h2o works fine.

Upvotes: 0

Views: 1124

Answers (2)

Hemen Kapadia
Hemen Kapadia

Reputation: 1

We are not shipping python 2.7 wheels for H2O4GPU, so you will need to use pip3 as suggested by FlyingTeller.

It would be best to use virtualenv to create a python environment to cause minimal changes to system python.

sudo apt-get install python3-pip
sudo pip3 install virtualenv
virtualenv -p python36 h2o4gpuenv
. h2o4gpuenv/bin/activate
pip install h2o4gpu-*.whl

Now in this same virtual environment, start python and try import h2o4gpu.

Upvotes: 0

FlyingTeller
FlyingTeller

Reputation: 20472

You are mixing python2 and python3. What you are using when running pip or python are all python2.7 (see also the output of pip show tensorflow where it is referring to /usr/local/lib/python2.7/dist-packages).

The library you are trying to use only has .whl for python 3.6 (note the py36 in the .whl files name)

Therefore, you need to either:

  • Switch to using pip3 and python3
  • Find another library that works with python 2.7

Upvotes: 1

Related Questions