jupyter notebook 工作目录修改

Posted on 2017-04-11 22:38  柳泉松声  阅读(2880)  评论(0编辑  收藏  举报

在windows命令行里面输入:

jupyter notebook --generate-config

就可以在本机用户名目录下(如C:\Users\captian\.jupyter)生成jupyter_notebook_config.py文件;

打开此文件,找到

c.NotebookApp.notebook_dir =u'你的path'

修改就可以了。

参考:

https://segmentfault.com/q/1010000004474199


上述方法无用的时候,还是得用就的ipython notebook的方法:

1. 打开命令行, 键入

ipython profile create

2. 键入 , 根据这个地址, 打开profile所在的文件夹

ipython locate

例如我的是:

C:\Users\lxf\.ipython\profile_default

3. 打开这个文件: ipython_notebook_config.py (实际上没有,需要自己拷贝一个进来,具体这个从哪里来的我忘了)

添加

c.NotebookManager.save_script = True

c.NotebookManager.notebook_dir = u'C:\\Users\\'  (任何想要的路径)

 

Copyright © 2024 柳泉松声
Powered by .NET 8.0 on Kubernetes