pythonapache-zeppelinpythoninterpreter

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.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)

I am trying to use python on my notebooks on Zeppelin. I have both java and python paths added to my Environment Variables, and I have the library py4j installed, too. Also I have added the local host that I am using to the Zeppelin-site.xml file. 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. 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!


Solution

  • I was able to get past the above error by using a fresh download of Zeppelin. I did run into another issue however when trying to use the python interpreter: Apache Zeppelin 8.1 Win10 Python Interpreter Error

    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

    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

    From this point I wasn't sure where it was trying use this folder named tmp. On my PC the location ended up being in root of C, so C:\tmp