首页文章修改Jupyter默认工作目录

修改Jupyter默认工作目录

计算机技术 · python 程序开发2025-08-310次浏览0 个评论

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

text
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、若不存在,执行下述命令,生成配置文件

text
(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’为指定的工作目录

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

4、重新启动jupyter即可

text
jupyter notebook

评论

0

评论加载中…

发表评论

0/2000