Search code examples
pythonpiph2oh2o4gpu

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.


Solution

  • 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