(h2o.ai python)h2o.init()无法导入名称流

时间:2017-08-10 21:10:29

标签: python h2o

我正在尝试为python(版本2.7.13)运行h2o,并在尝试使用h2o.init()(或h2o.h2o.init())时收到此错误。

Checking whether there is an H2O instance running at http://localhost:54321. connected.
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-37-a1412a2642a8> in <module>()
      2 
      3 # http://h2o-release.s3.amazonaws.com/h2o/master/3135/docs-website/h2o-py/docs/h2o.html#h2o.h2o.init
----> 4 h2o.h2o.init(start_h2o=True)

/cygdrive/c/Users/rvillanueva/python-virtualenvs-base/h2o-model-retraining/lib/python2.7/site-packages/h2o/h2o.pyc in init(url, ip, port, https, insecure, username, password, cookies, proxy, start_h2o, nthreads, ice_root, enable_assertions, max_mem_size, min_mem_size, strict_version_check, ignore_config, **kwargs)
    256         hs = H2OLocalServer.start(nthreads=nthreads, enable_assertions=enable_assertions, max_mem_size=mmax,
    257                                   min_mem_size=mmin, ice_root=ice_root, port=port)
--> 258         h2oconn = H2OConnection.open(server=hs, https=https, verify_ssl_certificates=not insecure,
    259                                      auth=auth, proxy=proxy,cookies=cookies, verbose=True)
    260     if check_version:

/cygdrive/c/Users/rvillanueva/python-virtualenvs-base/h2o-model-retraining/lib/python2.7/site-packages/h2o/h2o.pyc in version_check()
    108     return h2oconn
    109 
--> 110 
    111 def version_check():
    112     """Used to verify that h2o-python module and the H2O server are compatible with each other."""

/cygdrive/c/Users/rvillanueva/python-virtualenvs-base/h2o-model-retraining/lib/python2.7/site-packages/h2o/__init__.py in <module>()
      9 from __future__ import absolute_import, division, print_function, unicode_literals
     10 
---> 11 from h2o.h2o import (connect, init, api, connection,
     12                      lazy_import, upload_file, import_file, import_sql_table, import_sql_select,
     13                      parse_setup, parse_raw, assign, deep_copy, get_model, get_grid, get_frame,

ImportError: cannot import name flow

我在jupyter笔记本中这样做,但是当我运行

时出现同样的错误
>>import h2o
>>h2o.init()
从控制台

。使用h2o.h2o.H2OConnection.jar_paths()显示我的h2o.jar文件在路径中,我确保h2o.jar版本和python h2o包版本相同(和最新的3.10.5.4)),所以我不确定这里可能出现什么问题。

尝试init()h2o后运行h2o.cluster().show_status()给出输出:

H2O cluster uptime: 16 mins 56 secs
H2O cluster version:    3.10.5.4
H2O cluster version age:    23 days
H2O cluster name:   ******
H2O cluster total nodes:    2
H2O cluster free memory:    7.028 Gb
H2O cluster total cores:    16
H2O cluster allowed cores:  16
H2O cluster status: accepting new members, 1 nodes are not healthy
H2O connection url: http://localhost:54321
H2O connection proxy:   None
H2O internal security:  False
Python version: 2.7.13 final

这让我觉得init()起作用(至少部分),但是这个错误让我想知道什么问题会潜入困境。

有关这意味着什么以及如何解决问题的帮助将不胜感激。

谢谢:)

0 个答案:

没有答案