1. The default path
The default file path of Jupyter notebook is located on the C drive, which is not very friendly for beginners or those who already have a certain learning foundation. At this time, it is necessary to modify its default save path.
2. Modify the path
1. Open Anaconda Prompt
2. Enter the command:
jupyter notebook --generate-config
From the running results, we can know the location of "jupyter_notebook_config.py"
3. Right-click the mouse and select Open with Notepad
Find the location of " #c.NotebookApp.notebook_dir = " , probably around line 380
Remove the preceding "#"
Add the path in the single quotes ' ' as a previously created folder (here D:\\jupyter_notebook_project as an example)
save and exit
4. In the shortcut of Jupyter Notebook (anaconda), right click the mouse (more) to open the file location
Right-click the mouse, click Properties, in the shortcut-target line, remove the last " %USERPROFILE%/ "
5. Restart Jupyter Notebook (anaconda), and you can see that the path has been modified successfully.
PS If the modification is not successful after restarting, try a few more times.