Skip to content
Export SageNB Notebooks (to Jupyter)
Branch: master
Clone or download
Latest commit ba6d0f0 Apr 19, 2017
Type Name Latest commit message Commit time
Failed to load latest commit information.
sagenb_export Use standard BROWSER variable for running SageNB Apr 19, 2017
.gitignore Packaging fixes Jan 12, 2016
.travis.yml Travis does not have Python 3.5 installed, disable Jul 2, 2016
LICENSE Update Feb 23, 2017
Makefile Initial commit Dec 24, 2015 Add TravisCI tests Jul 2, 2016
tox.ini Python3 compatibility Jul 2, 2016

Convert SageNB Notebooks

This is a tool to convert SageNB notebooks to other formats, in particular IPython/Jupyter notebooks.


pip install git+


sage -pip install git+


First, you want to list the existing notebooks. Each notebook has a unique id and a not necessarily unique name:

$ sagenb-export --list
Unique ID       | Notebook Name
admin:10        | Oxford Seminar (1,1)-Calabi Yau

You can specify notebooks by the ID or by name; If the name is not unique, the first notebook found in the filesystem wins. To convert it to a Jupyter/IPython notebook, use the --ipynb switch as in

$ sagenb-export --ipynb=Output.ipynb admin:10

You can then open the saved Output.ipynb via

$ sage --notebook=jupyter Output.ipynb


  • Various output formats are not supported, e.g. no pictures. The simplest solution is to re-evaluate.

  • SageNB html input cells are converted to Jupyter raw NBConvert cells; In the interactive Jupyter notebook these are not rendered as html but shown as their html source code. If you export to HTML (File -> Download as -> HTML) they are rendered as html, though.

Testing and Python Compatibility

  • The git-trac command supports Python 2.7, and 3.4+.
  • Most recent Travis CI test: Build Status
You can’t perform that action at this time.