Jupyter is a server but also an ecosystem of tools for data exploration.
JupyterLab is a web interface to notebooks which can be used to document, visualize and perform computations.
Computations in Jupyter are performed by a kernel, a separa component that understands how to perform calculations on request and return the result back to Jupyter.
As such, a single JupyterLab installation can have multiple kernels with different configurations for different needs.
One can have a kernel for Python 3.8, another for 3.9 or 3.10, or even kernels from different languages such as R, Julia, or many others.
Adding a kernel
Creating a new environment
First start by creating a new environment with the software you need.
conda create --prefix $HOME/conda-py310 python==3.10 jupyter seaborn
source activate $HOME/conda-py310
In this case,
jupyter should also be installed so we can register the kernel with jupyterlab.
Installing/Removing the kernel
ipython kernel install --name "Py 3.10 local" --user
We can then confirm that the kernel was installed by issuing the following command:
that will list all registered kernels:
If at any point we want to remove the kernel, we can use the listed name to remove it.
For instance if we wanted to remove
py-3.10-local that we added above we would:
jupyter kernelspec remove py-3.10-local
To confirm you can execute:
that should list all but the removed kernel.
If you then navigate to the dashboard of jupyterlab, what before looked like:
will then become after a few minutes. If it still doesn’t appear, refresh your browser.
As the jupyter ecosystem supports many languages, you can also install them on the EMBL jupyterhub system.
If you wanted to install typescript support, you need to install the
itypescript kernel written for node.js
conda create --prefix /home/ralves/conda-tjs "typescript=3.6"
npm install -g itypescript
and then register it with jupyter
its --install=local --user
And like above, the new kernel should appear after a few minutes.
If you encounter any issues let us know in the EMBL Bio-IT chat and channel.
EMBL’s JupyterDev team
Photo by Mockup Graphics