Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents

Overview

This article describes how to add your mamba environments to Jupyter to use as a notebook kernel. You can learn about creating mamba environments in Managing Python Modules Through the mamba Environment Manager.

Creating the Jupyter Kernel

From the shell, add the kernel to the web user interface with the following command:

Code Block
languagebash
$ mkjupy <environment> "Icon Label"

Example:

$ mkjupy nobel "nobel"

This takes the environment called nobel and creates a Jupyter kernel for it. When creating a new notebook, it will have an Icon labeled nobel

Use the Environment in Jupyter Hub

In the webportal, create a new interactive session after selecting Jupyter from the server list. The new kernel is now available for driving notebooks!

...

Customizing logos is possible but not currently documented due to potential complexity. If interested, please come by office hours!

Removing a Kernel from the Web App

From the terminal, execute the following commands (once again assuming a fresh shell session).

This will only remove the kernel entry in Jupyter, and has no effect on the environment.

Code Block
languagebash
$ module load mamba/latest  
$ jupyter kernelspec remove nobel
Kernel specs to remove:
  nobel                 	/home/jyalim/.local/share/jupyter/kernels/nobel
Remove 1 kernel specs [y/N]: y
[RemoveKernelSpec] Removed /home/jyalim/.local/share/jupyter/kernels/nobel
Tip

Remove the kernel by the environment name, not the Jupyter kernel title.