修改jupyter notebook的默认路径

我的系统环境是win10,安装了anaconda3 for python 3.6.6
首先需要配置notebook的变量环境:打开 cmd 输入命令 jupyter notebook --generate-config,根据下一步的提示输入命令y,最后成功在C:Users你的用户名.jupyter目录中生成jupyter_notebook_config.py文件。

C:UsersAdministrator>jupyter notebook --generate-config
Overwrite C:UsersAdministrator.jupyterjupyter_notebook_config.py with default config? [y/N]y
Writing default config to: C:UsersAdministrator.jupyterjupyter_notebook_config.py

但通过改写jupyter_notebook_config.py文件中”c.NotebookApp.notebook_dir“语句的方式并不能改变jupyter notebook的默认路径。采用以下办法:
右键jupyter notebook,打开属性中的快捷方式,将目标最后的%USERPROFILE%前加上需要的默认路径,就成功了。

原文地址:https://www.cnblogs.com/dj1232090/p/10648678.html