备忘:jupyter notebook 更改默认目录

来源:互联网 发布:linux系统下载iso mac 编辑:程序博客网 时间:2024/05/29 10:10

jupyter notebook 更改默认目录

ipython notebook已经改为 jupyter notebook

在使用jupyter进行编程时,初始化目录可能不是自己想要的目录,那么下面讲解修改成自己想要的目录。

1) 在命令行中输入jupyter notebook --generate-config,会产生一个配置文件
我的会显示

Writing default config to: C:\Users\Admin\.jupyter\jupyter_notebook_config.py

这样的提示。

2) 根据上面目录找到对应的文件,搜索c.NotebookApp.notebook_dir

将前面的#注释去掉,在后面填上自己想要设置的初始化目录。比如我设置成

c.NotebookApp.notebook_dir =u'E:\Jupyter File'

以后就会将'E:\Jupyter File'这个目录成为初始化的目录。