smerllo
smerllo

Reputation: 3365

import h2o fails on anaconda cmd but works on windows cmd ?

I have successfully installed h2o package using pip. But I am having a weird problem when I try to import it using windows cmd it works well but it fails when I try to do it through anaconda prompt command, jyputer or Spyder ? I tried to restart them and run the command but still having the same problem.

See this screenshoot below : enter image description here

Upvotes: 0

Views: 458

Answers (1)

karhayrap
karhayrap

Reputation: 346

The problem that you are encountering is due to having multiple python versions on your machine, which is clearly visible in the screenshot. The default python version is not Anaconda python. After installing H2O using pip, it's not visible to python version installed via Anaconda distribution. There are a few options to solve this issue

  1. Install H2O using anaconda pip (from anaconda terminal)
  2. Install H2O using conda installer conda install -c anaconda h2o, which will install H2O version 3.18 from Anaconda channel
  3. Install directly from a channel maintained by H2O - conda install -c h2oai h2o, which is the up to date version of the library.

In addition, I would recommend correctly setting up environment variables and python path. Otherwise, it will become difficult to manage all of the packages and keep track which pip was used to install which package. Please see the following link for a discussion on how to add anaconda python to PYTHONPATH on a windows machine

https://docs.python.org/3/using/windows.html#excursus-setting-environment-variables

Upvotes: 1

Related Questions