docs/interpreter/jupyter.md
{% include JB/setup %}
Project Jupyter exists to develop open-source software, open-standards, and services for interactive computing across dozens of programming languages. Zeppelin's Jupyter interpreter is a bridge/adapter between Zeppelin interpreter and Jupyter kernel. You can use any of jupyter kernel as long as you installed the necessary dependencies.
To run any Jupyter kernel in Zeppelin you first need to install the following prerequisite:
Then you need install the jupyter kernel you want to use. In the following sections, we will talk about how to use the following 3 jupyter kernels in Zeppelin:
In order to use Jupyter Python kernel in Zeppelin, you need to install ipykernel first.
pip install ipykernel
Then you can run python code in Jupyter interpreter like following.
%jupyter(kernel=python)
%matplotlib inline
import matplotlib.pyplot as plt
plt.plot([1, 2, 3])
In order to use IRKernel, you need to first install IRkernel package in R.
install.packages('IRkernel')
IRkernel::installspec() # to register the kernel in the current R installation
Then you can run r code in Jupyter interpreter like following.
%jupyter(kernel=ir)
library(ggplot2)
ggplot(mpg, aes(x = displ, y = hwy)) +
geom_point()
In order to use Julia in Zeppelin, you first need to install IJulia first
using Pkg
Pkg.add("IJulia")
Then you can run julia code in Jupyter interpreter like following.
%jupyter(kernel=julia-1.3)
using Pkg
Pkg.add("Plots")
using Plots
plotly() # Choose the Plotly.jl backend for web interactivity
plot(rand(5,5),linewidth=2,title="My Plot")
Pkg.add("PyPlot") # Install a different backend
pyplot() # Switch to using the PyPlot.jl backend
plot(rand(5,5),linewidth=2,title="My Plot")
For any other jupyter kernel, you can follow the below steps to use it in Zeppelin.
jupyter kernelspec list
%jupyter(kernel=kernel_name)
code