Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Assuming that the notebook is foo.ipynb, you can type:

$ sage -n jupyter foo.ipynb

Once you close the notebook, the Jupyter server remains active. To open a new notebook, you can type https://localhost:xxxx ( where xxxx usually is 8888) in your default browser and access the Jupyter landing page. If you want to finish working, you should stop manually the server.

Assuming that the notebook is foo.ipynb, you can type:

$ sage -n jupyter foo.ipynb

Once you close the notebook, the Jupyter server remains active. To open a new notebook, you can type https://localhost:xxxx ( where xxxx usually is 8888) in your default browser and access the Jupyter landing page. If you want to finish working, you should stop manually the server.

EDIT (to answer @Cyrille's comment): You can do this:

  1. Open the notebook, say foo.ipynb, in Jupyter.
  2. Export the notebook as a Python script by choosing File > Download as > Python (.py). You get foo.py somewhere in your computer (probably in the Downloads folder)
  3. Rename foo.py to foo.sage
  4. In the console, use cd C:\path\to\folder to go to the folder where foo.sage is located
  5. Launch SageMath by typing sage
  6. Inside Sagemath, run foo.sage by typing load("foo.sage")
  7. Repeat the last three steps every time you want