Skip to content

Converting Jupyter Notebook to a Python File

Introduction

Users may either leverage on the execnotebook command or convert their .ipynb files into Python Files to be submitted through the sbatch command for processing.

Converting the .ipynb file on your local machine

  1. On your local machine, navigate to the directory where the notebook is located
  2. Execute the following command jupyter nbconvert --to script <NOTEBOOK NAME>.ipynb Screenshot1

Using the Jupyter Notebook interface

File ➡️ Download As ➡️ Python

Screenshot2