Ask Your Question

# Revision history [back]

One option, if you want to define a directory to be the default Jupyter notebook directory: first run

sage -n jupyter --generate-config


This should print a message like

Writing default config to: /..../.sage/jupyter-4.1/jupyter_notebook_config.py


Now edit the named file: look for the lines

## The directory to use for notebooks and kernels.
#c.NotebookApp.notebook_dir = u''


and change the second: delete the # in front (which is a comment character) and replace the blank string '' with the directory you want.

If you have not done the preceding, then another option should be

sage -n jupyter --NotebookApp.notebook_dir=/path/to/dir