Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jupyter notebook starting directory

I'm trying to set a custom starting directory in Jupyter Notebook. I have edited jupyter_notebook_config.py.

Removed # from line "c.NotebookApp.notebook_dir =", added parameter:

c.NotebookApp.notebook_dir = u'c:\\my\\chosen\\directory'.

But still doesn't work, console coming up with error, and jupyter starting in the default home directory.

I'm using Windows server 2008. According to the manuals, it should work.

Does anyone have a suggestion about my problem?

like image 319
Smidelius Avatar asked Aug 31 '16 14:08

Smidelius


1 Answers

The followings steps work perfectly for me on Windows:

First find which directory Jupyter is looking in for your config file:

jupyter --config-dir

If there is no jupyter_notebook_config.py file in that directory, generate one by typing:

jupyter notebook --generate-config

Then edit the jupyter_notebook_config.py file and add something like:

## The directory to use for notebooks and kernels.
c.NotebookApp.notebook_dir = 'c:\\users\\rsignell\\documents\\github'

Then start your jupyter notebook from any directory:

jupyter notebook

and it will start in the directory you specified.

For more info see: http://jupyter-notebook.readthedocs.io/en/latest/config.html

like image 141
Rich Signell Avatar answered Sep 19 '22 02:09

Rich Signell