Hi all,
I have recently released an extension that allows to interact
with Lmod environment modules directly in Jupyter's interface.
The extension is named jupyterlmod:
For those who do not know about environment modules, from
Wikipedia [1]:
> Environment Modules system is a tool to help users manage
> their Unix or Linux shell environment, by allowing groups of
> related environment-variable settings to be made or removed
> dynamically.
Lmod is a Lua based module system that also provides a Python
interface to interact with the modules. [2]
On a system with environment modules, a user who wishes
to use a specific set of modules would first have to load them
before launching the Jupyter notebook process. jupyter-lmod
removes that necessity by allowing the user to manage its
environment modules directly inside Jupyter's interface.
The extension adds a tab (Softwares) to Jupyter tree interface.
In this tab, it is possible to search for available modules and
load them. The interface also allows modules viewing and unloading.
Module collections are supported through the save and restore
buttons.
The interface works by modifying the os.environ content of the
Jupyter notebook process which spawned kernels inherits. The
instructions to modify os.environ are provided by Lmod Python
interface. Actions taken on the modules only affect kernels
that are spawned afterward or restarted.
The main target for this extension are Jupyterhub hosted on
HPC servers. At least, that's why I built it for our site.
The package is available on PyPI and the source code is on
Github. If you have any questions or comments, I'm all ears.
Finally, a quick preview:

--