Zeppelin运行Python代码遇SLF4J多绑定及解释器进程报错求解决
Zeppelin Python解释器启动失败及SLF4J冲突问题解决办法
问题描述
尝试在Zeppelin中运行以下Python代码:
%python print("hello-world")
出现错误:
org.apache.zeppelin.interpreter.InterpreterException: java.io.IOException: Interpreter process is not running SLF4J: Class path contains multiple SLF4J bindings. SLF4J: Found binding in [jar:file:/C:/zappelin/zeppelin-0.10.1-bin-all/interpreter/python/python-interpreter-with-py4j-0.10.1.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: Found binding in [jar:file:/C:/zappelin/zeppelin-0.10.1-bin-all/lib/slf4j-log4j12-1.7.30.jar!/org/slf4j/impl/StaticLoggerBinder.class]
解决步骤
处理SLF4J绑定冲突:
找到Zeppelin安装目录下的C:/zappelin/zeppelin-0.10.1-bin-all/lib文件夹,删除其中的slf4j-log4j12-1.7.30.jar文件,避免多个SLF4J绑定干扰解释器启动。检查Python解释器配置:
进入Zeppelin的Interpreter设置页面,定位到Python解释器配置项:- 确认
python.exec指向的Python可执行文件路径正确(如C:/Python39/python.exe),确保该Python环境能正常运行; - 若使用虚拟环境,需指定虚拟环境内的Python路径。
- 确认
重启Zeppelin服务:
完全关闭Zeppelin的所有进程,再重新启动服务,让配置修改和文件删除生效。验证运行:
重新打开Notebook运行测试代码,检查解释器是否正常启动并输出hello-world。
内容的提问来源于stack exchange,提问作者Santhana Krishnan
相关产品推荐
相关产品推荐

