修改jupyter notebook 的默认打开存储位置

如果使用anaconda直接安装jupyter notebook的话,jupyter notebook的文件目录在C盘下,这看起来很不爽,所以要改变jupyter notebook的文件目录,网上看到许多方法,总结一下。
正确的方法:
1.打开 Anaconda Prompt
2.输入命令 jupyter notebook --generate-config 

修改jupyter notebook 的默认打开存储位置

可以看到生成了目录及jupyter notebook的配置文件

3.打开C:/Users/你的账户/.jupyter/jupyter_notebook_config.py

修改jupyter notebook 的默认打开存储位置
4.修改 #c.NotebookApp.notebook_dir = '' 为 c.NotebookApp.notebook_dir = '你想要默认打开的文件夹'

5.开始菜单找到 jupyter notebook 快捷键,右键->更多->打开文件所在位置,找打快捷方式在文件中的位置,右键->属性->目标,去掉最后的 %USERPROFILE%

修改jupyter notebook 的默认打开存储位置

6.现在点击快捷方式就可以直接在你想要默认打开的文件夹启动了