ArchWiki / Jupyter
ArchWiki / Jupyter
es:Jupyter ja:Jupyter zh-hans:Jupyter Jupyter is a project which produces browser-based interactive environments for programming, mathematics, and data science. It supports a number of languages via plugins ("kernels"), such as Python, Ruby, Haskell, R, Scala, Julia and Kotlin.
JupyterLab is "Jupyter’s Next-Generation Notebook Interface", while Jupyter Notebook is the original. See the Jupyter website for a comparison.
Installation
For JupyterLab, install the jupyterlab package.
For Jupyter Notebook, install the jupyter-notebook package.
To install third-party Jupyter Notebook extensions for the current user, use the --user option while executing jupyter nbextension install. To do the same for installation of JupyterLab extensions, set the following environment variable:
JUPYTERLAB_DIR=$HOME/.local/share/jupyter/laband verify it by running jupyter lab paths. Then onwards follow usual installation instructions.
Running
To start JupyterLab run:
$ jupyter labTo start Jupyter Notebook run:
$ jupyter notebookNavigate to the URL given on the standard output if a web browser does not automatically open.
To start JupyterLab without launching browser and listening on port 9999 run
$ jupyter lab --no-browser --port 9999To change the default behavior, edit the configuration file:
c = get_config()
c.ExtensionApp.open_browser = False
c.ServerApp.port = 9999~/.jupyter/jupyter_lab_config.pySee jupyter lab --help-all for an overview of all options or run jupyter lab --generate-config to generate a default configuration file.
Kernels
C++
Install the cling-jupyter-git package.
Haskell
Install the ihaskell package. Then run ihaskell install.
Julia
Install the julia package and run julia to get a REPL prompt. Then run:
using Pkg
Pkg.add("IJulia")See the Julia manual for more details on package management.
Python
Python 3 kernel is used by default via python-ipykernel.
Perl
Install the iperl package and run iperl. Then press Ctrl+d. Now if you run jupyter you will see perl there.
R
Install the r-irkernel package. Then in an R console run:
require(IRkernel)
IRkernel::installspec()Alternatively you could follow the installation instructions in IR Kernel.
Rust
Install the evcxr_jupyter package.
SageMath
Install the sagemath package.
Octave
Install the jupyter-octave_kernel package.
Maxima
Install the maxima-jupyter-git package.
Cadabra
Install the cadabra2 package.
Kotlin
Install the python-kotlin-jupyter-kernel package.
Interactive widgets in JupyterLab
In order to enable interactive widgets in Jupyter Lab install python-ipympl and jupyterlab-widgets according to this github issue. Afterwards, in your notebook use:
%matplotlib widgetDon't forget to restart you JupyterLab instance after installing extensions.
It also might be helpful to RMB->Clear Outputs of All Cells after your extension manipulations