Support Questions
Find answers, ask questions, and share your expertise

Python interpreter in Zeppelin

Explorer

Hi,

I'm trying to add python interpreter in zeppelin. I checked the availability of python and also the path is set

export PATH=$PATH:/usr/bin/python

Already i have installed python get-pip.py and did a pip install py4j

I have also added the in the advanced zeppelin-config

in the zeppelin.interpreter.group.order

zeppelin.interpreters

After this still not able to see the python interpreter in the notebook.

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Python interpreter in Zeppelin

Hi @Sambasivam Subramanian
Yes, you definitely need to have the python interpreter data under /usr/hdp/current/zeppelin-server/interpreter, you can download zeppelin here and extract the python interpreter from the apache download. Also be sure to update interpreter.json afterwards.

View solution in original post

6 REPLIES 6

Re: Python interpreter in Zeppelin

Hi @Sambasivam Subramanian
Can you share all the steps you've taken?
Note that zeppelin on HDP supports these, and that using pyspark you can run python scripts;

  • Spark
  • JDBC (supports Hive, Phoenix)
  • OS Shell
  • Markdown
  • Livy (supports Spark, Spark SQL, PySpark, PySpark3, and SparkR)
  • AngularJS

source: https://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.6.5/bk_zeppelin-component-guide/content/using-i...

[root@c1175-node3 zeppelin-server]# cd interpreter/
[root@c1175-node3 interpreter]# ll
total 44
drwxr-xr-x 3 zeppelin zeppelin  4096 Jul 20 15:10 angular
drwxr-xr-x 3 zeppelin zeppelin 20480 Jul 20 15:10 jdbc
drwxr-xr-x 3 zeppelin zeppelin  4096 Jul 20 15:10 lib
drwxr-xr-x 3 zeppelin zeppelin  4096 Jul 20 15:10 livy
drwxr-xr-x 3 zeppelin zeppelin  4096 Jul 20 15:10 md
drwxr-xr-x 3 zeppelin zeppelin  4096 Jul 20 15:10 sh
drwxr-xr-x 7 zeppelin zeppelin  4096 Jul 20 15:11 spark

It is however also possible to add to this manually, did you download zeppelin manually and copy the interpreter/python directory to your HDP install of zeppelin, as part of the steps you've undertaken?

Please also note that you need to update interpreter.json which is normally found under /usr/hdp/current/zeppelin-server/conf

Re: Python interpreter in Zeppelin

Explorer

@Jonathan Sneep

Thanks for your response.

I added the service and followed the below steps

Installed python get-pip.py and did a pip install py4j

in the advanced zeppelin-config added python.

zeppelin.interpreter.group.order

zeppelin.interpreters

But i haven't downloaded zeppelin or copy the interpreter/python directory to the HDP and haven't done anything on the interpreter.json.

where should i have to download to get the interpreter/python directory.

Currently i only see the following in interpter folder (/usr/hdp/current/zeppelin-server/interpreter)

drwxr-xr-x 2 zeppelin zeppelin 136 Jun 27 13:13 angular

drwxr-xr-x 3 zeppelin zeppelin 20 Jun 27 13:13 lib

drwxr-xr-x 2 zeppelin zeppelin 12288 Jun 27 13:13 jdbc

drwxr-xr-x 2 zeppelin zeppelin 4096 Jun 27 13:13 livy

drwxr-xr-x 2 zeppelin zeppelin 4096 Jun 27 13:13 md

drwxr-xr-x 2 zeppelin zeppelin 191 Jun 27 13:13 sh

drwxr-xr-x 3 zeppelin zeppelin 66 Jun 27 13:13 spark

Thanks!

Re: Python interpreter in Zeppelin

Hi @Sambasivam Subramanian
Yes, you definitely need to have the python interpreter data under /usr/hdp/current/zeppelin-server/interpreter, you can download zeppelin here and extract the python interpreter from the apache download. Also be sure to update interpreter.json afterwards.

View solution in original post

Re: Python interpreter in Zeppelin

@Sambasivam Subramanian
I've just noticed that there is a script to help on this available, which I was unaware of, it would be easier this way;

[root@lab-1 ~]# /usr/hdp/2.6.5.0-292/zeppelin/bin/install-interpreter.sh -n python

Install python(org.apache.zeppelin:zeppelin-python:0.7.0) to /usr/hdp/2.6.5.0-292/zeppelin/interpreter/python ...
Interpreter python installed under /usr/hdp/2.6.5.0-292/zeppelin/interpreter/python.

1. Restart Zeppelin
2. Create interpreter setting in 'Interpreter' menu on Zeppelin GUI
3. Then you can bind the interpreter on your note

Re: Python interpreter in Zeppelin

Explorer
@Jonathan Sneep

Hi, Can you tell me what parameters to be updated as a part of interpreter.json.

should i have to add in interpreter settings and interpreter group

Re: Python interpreter in Zeppelin

Explorer

@jonathan Sneep

Hi,

Thanks a lot. It looks good now. Thanks once again.