更改jupyter-notebook启动时的默认目录

1.打开 cmd ,输入命令 jupyter notebook –generate-config,等待生成 jupyter_notebook_config.py文件;
2.找到文件 jupyter_notebook_config.py,在C:\Users\Administrator\.jupyter ;
3.用记事本打开找到 # The directory to use for notebooks and kernels.
修改这一句c.NotebookApp.notebook_dir = u’
为c.NotebookApp.notebook_dir = u’D:\\jupyternotebook’注:将#号删除,路径是\\双斜线,或者\单斜线 ,D:\\jupyternotebook为自己想要设置的目录