Change the default working directory of jupyter notebook

When we install jupyter notebook, how do we need to change the default working directory:

1. Open the windows command line window, win+R shortcut key and enter cmd to open;

2. Enter jupyter notebook --generate-config in the command line window, the system will generate the jupyter_notebook_config.py file, which can be searched through the everything software;

3. Open the jupyter_notebook_config.py file with notepad, Ctrl + F to find the configuration: c.NotebookApp.notebook_dir, delete the previous note, and then add the working directory that needs to be modified. For example, my working directory is: D:\python, in order to avoid transferring For the problem of meaning characters, you can set the parameter to: c.NotebookApp.notebook_dir=r'D:\python'

4. Restart jupyter notebook.

 

Guess you like

Origin blog.csdn.net/u012724887/article/details/107134807