Windows中的Python h2o:无法初始化(TypeError:“NoneType”types的参数不可迭代)

我想在我的公司使用python h2o

使用该命令之后:

>import h2o > h2o.init() 

我有

 h2o\connection.py:110: UserWarning: Proxy environment variable `HTTP_PROXY` with value `http://username:password@proxy.**.com:8080` found. This may interfere with your H2O Connection. warnings.warn("Proxy environment variable `" + name + "` with value `" + value + "` found. This may interfere with your H2O Connection.") h2o\connection.py:110: UserWarning: Proxy environment variable `HTTPS_PROXY` with value `https://username:password@proxy.**.com:8080` found. This may interfere with your H2O Connection. warnings.warn("Proxy environment variable `" + name + "` with value `" + value + "` found. This may interfere with your H2O Connection.") No instance found at ip and port: localhost:54321. Trying to start local jar... JVM stdout: c:\users\zchen6\appdata\local\temp\tmpqwjtad\h2o_zchen6_started_from_python.out JVM stderr: c:\users\zchen6\appdata\local\temp\tmpegwtrj\h2o_zchen6_started_from_python.err Using ice_root: c:\users\zchen6\appdata\local\temp\tmpftvwrm Traceback (most recent call last): File "<stdin>", line 1, in <module> File "h2o\h2o.py", line 722, in init password=password,max_mem_size_GB=max_mem_size_GB,min_mem_size_GB=min_mem_size_GB,proxies=proxies,size=size) File "h2o\connection.py", line 133, in __init__ cld = self._start_local_h2o_jar(max_mem_size, min_mem_size, enable_assertions, license, ice_root, jar_path, nthreads) File "h2o\connection.py", line 269, in _start_local_h2o_jar jver = subprocess.check_output([command, "-version"], stderr=subprocess.STDOUT) File "C:\Anaconda2\lib\subprocess.py", line 566, in check_output process = Popen(stdout=PIPE, *popenargs, **kwargs) File "C:\Anaconda2\lib\subprocess.py", line 710, in __init__ errread, errwrite) File "C:\Anaconda2\lib\subprocess.py", line 913, in _execute_child args = list2cmdline(args) File "C:\Anaconda2\lib\subprocess.py", line 616, in list2cmdline needquote = (" " in arg) or ("\t" in arg) or not arg TypeError: argument of type 'NoneType' is not iterable 

我尝试在init()中将值设置为名为proxy的variables,但它仍然给了我同样的错误。

尝试之后

 h2o.init(start_h2o=False) 

我有

 h2o\connection.py:110: UserWarning: Proxy environment variable `HTTP_PROXY` with value `http://username:password@proxy.**.com:8080` found. This may interfere with your H2O Connection. warnings.warn("Proxy environment variable `" + name + "` with value `" + value + "` found. This may interfere with your H2O Connection.") h2o\connection.py:110: UserWarning: Proxy environment variable `HTTPS_PROXY` with value `https://username:password@proxy.**.com:8080` found. This may interfere with your H2O Connection. warnings.warn("Proxy environment variable `" + name + "` with value `" + value + "` found. This may interfere with your H2O Connection.") Traceback (most recent call last): File "<stdin>", line 1, in <module> File "h2o\h2o.py", line 722, in init password=password,max_mem_size_GB=max_mem_size_GB,min_mem_size_GB=min_mem_size_GB,proxies=proxies,size=size) File "h2o\connection.py", line 123, in __init__ if not start_h2o: raise ValueError("Cannot connect to H2O server. Please check that H2O is running at {}".format(H2OConnection.make_url(""))) ValueError: Cannot connect to H2O server. Please check that H2O is running at http://localhost:54321/3/ 

顺便说一下,我用的h2o版本是3.8.2.5。 提前致谢。

关闭代理应该解决这个问题。