How to change the Jupyter Lab start-up folder
Use the jupyter notebook config file:
Open the command line (or Anaconda Prompt) and run:
1 | jupyter notebook --generate-config. |
This will create a jupyter_notebook_config.py file in the .jupyter directory, with all the defaults commented out.:
1 | C:\Users\"YourUserName"\.jupyter\jupyter_notebook_config.py. |
Browse to the file location and open it in an Editor
Search for the following line in the file and remove the # at the beginning of the line to allow the line to execute.
Jupyter Lab is:
1 | #c.ServerApp.notebook_dir = '' |
or Jupyter Notebook is:
1 | #c.NotebookApp.notebook_dir = '' |
Replace by
1 | c.ServerApp.notebook_dir = '/the/path/to/home/folder/' |
We Make sure you use forward slashes in your path and use /home/user/ instead of ~/ for your home directory on Linux, backslashes could be used if placed in double quotes even if the folder name contains spaces as such: “D:\yourUserName\Any Folder\More Folders\” or without double quotes D:\YourUserName\AnyFolder\More Folders\ on windows.
We create a video with the example:
Option 2:
We using windows 10 (64 bit) with Anaconda2. In the start menu, right click
1 | Jupyter Notebook -> Properties. |
In the Target field, change
1 | %USERPROFILE% |
to your new
1 | "D:\path". |