Modify the default open file path of Jupiter notebook

1. Add jupyter_ notebook_ Config.py configuration file

·For Windows systems, open Anaconda prompt and enter the following command:

jupyter notebook --generate-config

After executing the command, it will generate a file named Jupiter_ notebook_ Config. Py

At the same time, the window will display the path of the configuration file, such as C: \ users \ user \. Jupyter \ jupyter_ notebook_ config.py

·For Linux system, open the terminal and directly enter the following commands

jupyter notebook --generate-config

After executing the command, it will generate a file named Jupiter_ notebook_ Config. Py

At the same time, the window will display the path of the configuration file, such as /home/user /. Jupyter/jupyter_ notebook_ config.py

2. Modify jupyter_ notebook_ Config.py configuration file

Open the file Jupiter according to the file path above_ notebook_ config.py

Find this line:

#c.NotebookApp.notebook_dir=''

Add the file path you want in ” and remove #, for example:

c.NotebookApp.notebook_dir='C:\Users\user\workspace'

Finally, create this folder under the corresponding file path, otherwise an error will be reported when opening Jupiter notebook.

Similar Posts: