修改Jupyter默认工作目录

zhangzhijun 1次浏览 0个评论

1、查看C:\Users\ZHANGZHIJUN\.jupyter>目录下是否存在jupyter_notebook_config.py文件

2024/11/23  11:50            39,429 jupyter_notebook_config.py
2024/11/23  11:23            lab
2024/11/17  10:39            labconfig
2024/11/17  09:49            32 migrated

2、若不存在,执行下述命令,生成配置文件

(base) C:\Users\ZHANGZHIJUN>jupyter notebook --generate-config
Writing default config to: C:\Users\ZHANGZHIJUN\.jupyter\jupyter_notebook_config.py

(base) C:\Users\ZHANGZHIJUN>conda jupyter

3、修改jupyter_notebook_config.py,其中’E:\Jupyter’为指定的工作目录

## DEPRECATED, use root_dir.
#  Default: ''
c.ServerApp.notebook_dir = 'E:\Jupyter'

4、重新启动jupyter即可

jupyter notebook

版权申明:

本博客所有文章除特别声明外均采用 BY-NC-SA 4.0 许可协议。依据 BY-NC-SA 4.0 许可协议,转载请附上原文出处链接及本声明。

原文链接: https://www.zhangzhijun.life/xiugaijupytermorengongzuomulu.html

Default Avatar

评论

此字段内容将保密,不会被其他人看见。