How to install and choose a Jupyter kernel
Install the kernel
To run Jupyter notebooks, you need to add a Jupyter kernel in every conda environment that you create.
-
Activate your conda environment (if it is not).
-
Then, type the following, choosing your own
<name>
(this name can be different from your conda env name):conda install ipykernel -y && ipython kernel install --user --name "<name>"
-
You can list your installed Jupyter kernels considering:
ls /home/<username>/.local/share/jupyter/kernels
or
jupyter kernelspec list
-
Refresh your page to update the changes on the screen.
Choose the kernel
-
Open a Jupyter notebook file and click on the
kernel button
. Refer to Fig. 1, top-right (in this example, the kernel button readsSelect Kernel
but it can also saybase (Python 3.10.x)
.Fig. 1.
-
The kernel box opens. Choose
Jupyter Kernel
, refer to Fig. 2.Fig. 2.
-
As shown in Fig. 3, your Jupyter Kernels are listed, choose the one that you will use with your conda environment. In this example is called
text-kernel
.Fig. 3.
-
As shown in Fig. 4, top-right, the kernel button now shows the selected kernel. With this, you are ready to work with it.
Fig. 4.