赞
踩
Jupyter启动之后默认打开的是C盘目录,一般临时使用可以将文件建在桌面Desktop
想要打开其他盘符的文件无法实现,如D、E、F盘目录下的文件。现有解决办法如下,无需修改Jupyter Notebook的默认打开路径。
思路:
(1)先将jupyter notebook加入系统环境变量
【计算机】-【属性】-【高级系统设置】-【path】
(2)cmd中进入指定目录,运行jupyter notebook
命令
进入CMD模式 win + R
切换盘符 目标盘+:
进入文件夹 cd + 文件名
查看当前目录下文件 dir
启动jupyter jupyter notebook
jupyter notebook --generate-config
会生成配置文件
执行成功后,命令行窗口会提示
Writing default config to xxx\xxx\jupyter_notebook_config.py
jupyter_notebook_config.py
文件
找到#c.NotebookApp.notebook_dir = ''
这一行
后面添加新目录。(也可以搜索The directory to use for notebooks and kernels.这一行下方)
【注】
(1)参数前面#需要删除,#表示注释
(2)目录需要提前创建好
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。