Skip to content

Converting Jupyter Notebooks to Scripts

The Jupyter nbconvert tool allows you to convert an .ipynb notebook file into an executable python, Julia, Matlab, or R script.

In a terminal window go to the directory with your notebook. Then run:

jupyter nbconvert --to script notebook.ipynb

where notebook.ipynb is the name of the notebook you'd like to convert.

This will create a python script called which you can run from the command line or launch to run as a job on the SuperCloud.

Running your python script as a SuperCloud job

In order to run your python script as a batch job on SuperCloud, you will need to create a launch script. In this example, the script is called and we will load the Anaconda 2022b module:


module load anaconda/2022b

To launch your script, use the LLsub command:

$ LLsub

Please note that this is the basic instruction on how to convert and submit a Jupyter Notebook as a batch job. This job as is will only request a single core. If you need to use additional resources, you will need additional scheduler options. Please refer to the Submitting Jobs page for how to request additional resources.