Project Jupyter is a web-based interactive environment and/or computational notebook for different programming languages.
Programming languages
Jupyter is designed to be programming language-agnostic.
Jupyter has a different kernel for each support programming language. When you create a Jupyter notebook it asks you which kernel you want to apply.
Support programming languages:
- Python
- R
- Julia
Python
It uses IPython as a backend. You can read this post about IPython.
Jupyter uses the kernel ipykernel for notebooks using source code in Python.
R
Jupyter uses the kernel IRkernel for notebooks using source code in R.
User interface
There are different user interfaces for Jupyter:
- Jupyter Notebook
- Jupyter Lab
Jupyter Notebook is the original and older user interface.
Jupyter Lab is a newer user interface. Its use is recommended.
Jupyter setup
Jupyter installation
Jupyter is already bundled in Python distribution packages like Mambaforge or Anaconda. If you install any of them, Jupyter will be included.
If not installed, Jupyter can be installed using the conda package manager on the selected conda environment.
To install Jupyter:
conda install jupyter
The installation includes Jupyter Lab.
To just install Jupyter Notebook UI:
conda install jupyternotebook
To just install Jupyter Lab:
conda install jupyter-lab
It is recommended to install a different Jupyter instance for each project conda environment.
R kernel installation
The IRkernel is not installed by default.
Its installation is only necessary if you plan to embed R code. The installation instructions can be found on the code repository.
First, open an R session from the terminal:
You can install it from the terminal by typing:
R
To install it, open an R console:
install.packages('IRkernel')
IRkernel::installspec() # to register the kernel in the current R installation
jupyter labextension install @techrah/text-shortcuts # for RStudio’s shortcuts
When you are finished, type this to end the R session:
quit()
Jupyter update
Jupyter update:
conda update jupyter
conda update jupyter-lab
Jupyter run
Jupyter can be run from the OS command terminal.
jupyter lab launches the Jupyter Lab UI, with its home screen.
jupyter notebook opens the Jupyter Notebook, with its local filesystem tree.
Online Platforms
Online platforms:
- Google Colab
- Kaggle
- Binder