Benjamin Hackl

HOWTO: Use .ipynb (Jupyter notebook) SageMath files

Here are some instructions on how to view and use a .ipynb-File containing SageMath computations. In order to run the Notebook, you need to access an installation of SageMath somehow.

In case of questions, I’m happy to help — just contact me any way you prefer.

Option 1: Running the notebook locally on your computer

In order to install SageMath locally, please follow the instructions in the SageMath installation guide. For particularly quick access, consider installing SageMath via binaries (directly available for most operating systems), see the SageMath download page.

As soon as you have a running version of SageMath, you can start a local notebook server with the command

sage -n jupyter

Then, a tab in your browser should open where you can navigate and selevt the ipynb-file in order to view its content and to run the computations in the file.

Option 2: Using SageMath online

In case you do not want to install SageMath locally (or are not able to), you can always use CoCalc (formerly SageMathCloud). Navigate to https://cocalc.com/ and register for a free account or sign in, if you already have an account. Then, create a new project (or choose an existing one) and click the “New”-button in order to upload the .ipynb-file to the cloud. Afterwards, it can be found among the files of your project, and you can open it as usual.

Note that in order for some worksheets to work properly, you might have to adjust the selected SageMath-version (although, in general, everything starting from sage-7.4 should be okay).

Additionally, the resources available for a free CoCalc account might be not enough in order to carry out all computations in our worksheets. Then, either reverting to option 1 or buying additional resources is necessary.