Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Python interpreter not configured in Zeppelin on HDP2.5 sandbox?

Python interpreter not configured in Zeppelin on HDP2.5 sandbox?

New Contributor

Hi i am using HDP 2.5. I want run some python programs in zeppeline notebook for data profiling using pandas-profiling library. I am not able to locate python interpreter in zeppelin interpreter list.

Here is interpreter list :avlbl-interpreters-list.jpg

So far, i tried to install it using : sh install-interpreter.sh --name python --artifact org.apache.zeppelin:zeppelin-python: 0.6.1

But, I got this error,

[root@sandbox bin]# sh install-interpreter.sh --name python --artifact org.apache.zeppelin:zeppelin-python: 0.6.1 SLF4J: Class path contains multiple SLF4J bindings. SLF4J: Found binding in [jar:file:/usr/hdp/2.5.0.0-1245/zeppelin/lib/zeppelin-interpreter-0.6.0.2.5.0.0-124 5.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: Found binding in [jar:file:/usr/hdp/2.5.0.0-1245/zeppelin/lib/slf4j-log4j12-1.7.10.jar!/org/slf4j/im pl/StaticLoggerBinder.class] SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation. SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory] Install python(org.apache.zeppelin:zeppelin-python:0.6.1) to /usr/hdp/2.5.0.0-1245/zeppelin/interpreter/pyt hon ... Exception in thread "main" java.lang.NullPointerException at org.sonatype.aether.impl.internal.DefaultRepositorySystem.resolveDependencies(DefaultRepositoryS ystem.java:352) at org.apache.zeppelin.dep.DependencyResolver.getArtifactsWithDep(DependencyResolver.java:161) at org.apache.zeppelin.dep.DependencyResolver.loadFromMvn(DependencyResolver.java:114) at org.apache.zeppelin.dep.DependencyResolver.load(DependencyResolver.java:77) at org.apache.zeppelin.dep.DependencyResolver.load(DependencyResolver.java:94) at org.apache.zeppelin.dep.DependencyResolver.load(DependencyResolver.java:86) at org.apache.zeppelin.interpreter.install.InstallInterpreter.install(InstallInterpreter.java:170) at org.apache.zeppelin.interpreter.install.InstallInterpreter.install(InstallInterpreter.java:150) at org.apache.zeppelin.interpreter.install.InstallInterpreter.main(InstallInterpreter.java:275)

Could anyone please tell how to add python interpreter in zeppelin.

3 REPLIES 3
Highlighted

Re: Python interpreter not configured in Zeppelin on HDP2.5 sandbox?

Expert Contributor

Define %pyspark as the prefix to run python jobs in Zeppelin. This should be defined in the interpreter screen, on the top right. You will also need to make sure the pandas libs are installed.

Highlighted

Re: Python interpreter not configured in Zeppelin on HDP2.5 sandbox?

Expert Contributor

does the node you are running this have access to internet? like @graham Martin mentioned you can use %pyspark to run python code.

Alternatively if there is a need to install python interpreter, I managed to do it this way as my cluster did not have internet access. You will also have to install pandas via pip for the system default python to use panda library.

Python Interpreter manual installation steps

  • Download Zeppelin package from://archive.apache.org/dist/zeppelin/zeppelin-0.6.0/zeppelin-0.6.0-bin-all.tgz (check your version of zeppelina and download same version)
  • Extract the contents.
  • Start Zeppelin (bin/zeppelin-daemin.sh stop) from the downloaded package using command bin/zeppelin-daemon.sh start. This is to create necessary configuration files
  • Stop Zeppelin after few min using bin/zeppelin-daemin.sh stop.
  • Copy the data from interpreter/python to /usr/hdp/current/zeppelin-server/interpreter/python
  • Copy Python interpreter details from downloaded zeppelin package – conf/interpreter.json file to /etc/zeppelin/conf/interpreter.json file.
  • Add org.apache.zeppelin.python.PythonInterpreter to Advanced zeppelin-config – zeppelin.interpreters list via Ambari.
  • Start Zeppelin via Ambari
Highlighted

Re: Python interpreter not configured in Zeppelin on HDP2.5 sandbox?

New Contributor

Works like a charm !! Thank You.

Don't have an account?
Coming from Hortonworks? Activate your account here