You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Windows Server上Zeppelin无法运行Python代码的问题求助

Zeppelin在Windows Server 2019上Python/Shell解释器启动失败

环境信息

已在Windows Server 2019上完成Zeppelin 0.10.1配置并启动,环境变量如下:

HADOOP_HOME C:\hadoop\
JAVA_HOME   C:\Programm Files\Zulu\zulu-8\jre\
SPARK_HOME  C:\Saprk\spark-3.3.0-bin-hadoop3\

问题描述

已完成Python解释器配置,但在Notebook中执行以下Python代码时报错:

%python
print("Hello World")

执行Shell代码%sh echo 1也出现同类错误,核心错误栈如下:

org.apache.zeppelin.interpreter.InterpreterException: java.io.IOException: Fail to launch interpreter process:
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/C:/zeppelin-0.10.1-bin-netinst/interpreter/python/python-interpreter-with-py4j-0.10.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/C:/zeppelin-0.10.1-bin-netinst/lib/slf4j-log4j12-1.7.30.jar!/org/slf4j/impl/StaticLoggerBinder.class]
...
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 2
    at org.apache.zeppelin.interpreter.remote.RemoteInterpreterServer.main(RemoteInterpreterServer.java:305)

已尝试方案

找到过针对Java解释器同类问题的解决方法,但对Python/Shell解释器无效。


解决方法

1. 修复路径空格与拼写错误

  • 修正JAVA_HOME路径:C:\Programm Files\Zulu\zulu-8\jre\包含空格,Zeppelin启动脚本对含空格路径的参数解析容易出错,建议将Java迁移到无空格路径(如C:\Zulu\zulu-8\jre\),并更新环境变量。
  • 修正SPARK_HOME拼写:当前路径C:\Saprk\...存在拼写错误(应为Spark),修正路径和环境变量后重启Zeppelin。

2. 移除重复SLF4J依赖

虽然SLF4J多绑定警告不是直接报错原因,但可消除潜在冲突:

  • 进入Zeppelin安装目录的lib文件夹,将slf4j-log4j12-1.7.30.jar移至备份目录(避免直接删除,方便回滚),重启Zeppelin。

3. 修改启动脚本参数解析

编辑Windows下的zeppelin.cmd启动脚本,找到启动RemoteInterpreterServer的代码段,确保对包含空格的路径添加引号包裹,避免参数分割时出现数组越界。


内容的提问来源于stack exchange,提问作者Kaja

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.18 01:37:35