Skip to content
Contact Support

How do I run my Python Notebook through SLURM?

The first thing you will need to do is to convert your .ipynb (Interactive PYthon Note Book) file into a regular .py python file. There are two ways to do this.

nbconvert

nbconvert is a tool used to convert notebooks to other formats, it is accessible through the command line if you are logged in through Jupyter.

jupyter nbconvert --to script my_notebook.ipynb 

will create a new python script called my_notebook.py.

Export Notebook

With your notebook open, select File -> Save and Export Notebook As... -> Executable Script

This option might be less convenient as the exporter saves the python file to your local computer, meaning you will have to drag it back into the file explorer in Jupyter from your downloads folder.

This script can then be run as a regular python script as described in our Python documentation.