简体   繁体   English

为什么我的任何笔记本在Zeppelin 0.8.0上都无法使用python解释器?

[英]Why is python interpreter not working on Zeppelin 0.8.0 for any of my notebooks?

I am simply typing: 我只是在输入:

%python

print ("hi") 

but it keeps showing the following error every time I run it for any of my notebooks: 但是每次我在任何笔记本上运行它时,它始终显示以下错误:

java.lang.OutOfMemoryError: Java heap space at org.apache.thrift.protocol.TBinaryProtocol.readStringBody(TBinaryProtocol.java:379) at org.apache.thrift.protocol.TBinaryProtocol.readMessageBegin(TBinaryProtocol.java:230) at org.apache.thrift.TServiceClient.receiveBase(TServiceClient.java:69) at org.apache.zeppelin.interpreter.thrift.RemoteInterpreterService$Client.recv_createInterpreter(RemoteInterpreterService.java:209) at org.apache.zeppelin.interpreter.thrift.RemoteInterpreterService$Client.createInterpreter(RemoteInterpreterService.java:192) at org.apache.zeppelin.interpreter.remote.RemoteInterpreter$2.call(RemoteInterpreter.java:169) at org.apache.zeppelin.interpreter.remote.RemoteInterpreter$2.call(RemoteInterpreter.java:165) at org.apache.zeppelin.interpreter.remote.RemoteInterpreterProcess.callRemoteFunction(RemoteInterpreterProcess.java:135) at org.apache.zeppelin.interpreter.remote.RemoteInterpreter.internal_create(RemoteInterpreter.java:165) at org.apache.zeppelin.interpreter java.lang.OutOfMemoryError:Java堆空间位于org.apache.thrift.protocol.TBinaryProtocol.readMessageBegin(TBinaryProtocol.java:230)处的org.apache.thrift.protocol.TBinaryProtocol.readStringBody(TBinaryProtocol.java:379)处。 org.apache.zeppelin.interpreter.thrift.RemoteInterpreterService $ Client.recv_createInterpreter(RemoteInterpreterService.java:209)上的apache.thrift.TServiceClient.receiveBase(TServiceClient.java:69)在org.apache.zeppelin.interpreter.thrift。$ RemoteInterpreter位于org.apache.zeppelin.interpreter.remote.RemoteInterpreter $ 2.call(RemoteInterpreter.java:169)的Client.createInterpreter(RemoteInterpreterService.java:192)位于org.apache.zeppelin.interpreter.remote.RemoteInterpreter $ 2.call(RemoteInterpreter。 java:165)位于org.apache.zeppelin.interpreter.remote.RemoteInterpreterProcess.callRemoteFunction(RemoteInterpreterProcess.java:135)位于org.apache.zeppelin.interpreter.remote.RemoteInterpreter.internal_create(RemoteInterpreter.java:165) .zeppelin。解释器 .remote.RemoteInterpreter.open(RemoteInterpreter.java:132) at org.apache.zeppelin.interpreter.remote.RemoteInterpreter.getFormType(RemoteInterpreter.java:299) at org.apache.zeppelin.notebook.Paragraph.jobRun(Paragraph.java:407) at org.apache.zeppelin.scheduler.Job.run(Job.java:188) at org.apache.zeppelin.scheduler.RemoteScheduler$JobRunner.run(RemoteScheduler.java:307) at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(Unknown Source) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) org.apache.zeppelin.interpreter.remote.RemoteInterpreter.getFormType(RemoteInterpreter.java:299)上的.remote.RemoteInterpreter.open(RemoteInterpreter.java:132)在org.apache.zeppelin.notebook.Paragraph.jobRun(Paragraph.java :407),位于org.apache.zeppelin.scheduler.RemoteScheduler $ JobRunner.run(RemoteScheduler.java:307),位于org.apache.zeppelin.scheduler.RemoteScheduler $ JobRunner.run(RemoteScheduler.java:307),位于java.util.concurrent。 Executors $ RunnableAdapter.call(未知源),java.util.concurrent.FutureTask.run(未知源),java.util.concurrent.ScheduledThreadPoolExecutor $ ScheduledFutureTask.access $ 201(未知源),java.util.concurrent.ScheduledThreadPoolExecutor $ ScheduledFutureTask .run(未知源)处java.util.concurrent.ThreadPoolExecutor.runWorker(未知源)处java.util.concurrent.ThreadPoolExecutor $ Worker.run(未知源)处java.lang.Thread.run(未知源)

I am trying to use python on my notebooks on Zeppelin. 我试图在齐柏林飞艇上的笔记本上使用python。 I have both java and python paths added to my Environment Variables, and I have the library py4j installed, too. 我将Java和python路径都添加到了我的环境变量中,并且我也安装了库py4j。 Also I have added the local host that I am using to the Zeppelin-site.xml file. 另外,我已经将我正在使用的本地主机添加到Zeppelin-site.xml文件中。 I also found this link on a similar issue on Stack Overflow and tried everything in it to change the size of the java space but still didn't work. 我还在Stack Overflow上的类似问题上找到了此链接,并尝试了其中的所有内容以更改Java空间的大小,但仍然无法正常工作。 http://apache-zeppelin-users-incubating-mailing-list.75479.x6.nabble.com/Can-not-configure-driver-memory-size-td1513.html http://apache-zeppelin-users-incubating-mailing-list.75479.x6.nabble.com/Can-not-configure-driver-memory-size-td1513.html

Any little help is much appreciated! 任何帮助都将不胜感激!

I was able to get past the above error by using a fresh download of Zeppelin. 通过使用全新的Zeppelin下载,我能够克服上述错误。 I did run into another issue however when trying to use the python interpreter: Apache Zeppelin 8.1 Win10 Python Interpreter Error 但是,在尝试使用python解释器时,我确实遇到了另一个问题: Apache Zeppelin 8.1 Win10 Python解释器错误

The stack trace in the cmd window used to launch Zeppelin revealed the follow error: Apache Zeppelin 8.1 Win10 Python Interpreter Error Stack Trace 用于启动Zeppelin的cmd窗口中的堆栈跟踪显示了以下错误: Apache Zeppelin 8.1 Win10 Python Interpreter Error堆栈跟踪

Basically by referencing the code I was able to see the python interpreter is attempting to create a temporary file and put into a folder named tmp: https://github.com/apache/zeppelin/blob/branch-0.8/python/src/main/java/org/apache/zeppelin/python/PythonInterpreter.java , line 102 基本上通过引用代码,我能够看到python解释器正在尝试创建一个临时文件并将其放入名为tmp的文件夹中: https : //github.com/apache/zeppelin/blob/branch-0.8/python/src/ main / java / org / apache / zeppelin / python / PythonInterpreter.java ,第102行

From this point I wasn't sure where it was trying use this folder named tmp. 从这一点上,我不确定它在哪里尝试使用名为tmp的文件夹。 On my PC the location ended up being in root of C, so C:\\tmp 在我的PC上,该位置最终位于C的根目录下,因此C:\\ tmp

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM