设置jupyter notebook的保存位置
时间: 2023-08-22 07:03:50 浏览: 235
可以通过以下步骤设置jupyter notebook文件存放位置:
1. 打开jupyter notebook,点击右上角的“New”按钮,选择“Terminal”打开终端。
2. 在终端中输入以下命令,创建一个新的jupyter配置文件:
`jupyter notebook --generate-config`
3. 打开生成的配置文件,可以使用以下命令打开:
`vim ~/.jupyter/jupyter_notebook_config.py`
4. 在配置文件中找到以下行:
`#c.NotebookApp.notebook_dir = ''`
将其取消注释,并将引号中的路径改为你想要的文件存放位置。
例如,如果你想将文件存放在/home/user/notebooks目录下,可以将其改为:
`c.NotebookApp.notebook_dir = '/home/user/notebooks'`
5. 保存配置文件并退出。
6. 重新启动jupyter notebook,你的文件将会存放在指定的位置。
相关问题
jupyter notebook保存
在Jupyter Notebook中保存你的工作非常简单。你可以通过以下步骤保存你的笔记本:
1. 点击菜单栏中的 "文件" 选项。
2. 选择 "保存" 或 "另存为"。
3. 如果是第一次保存该文件,则需要为文件命名,并选择保存的位置。
4. 如果文件已经被保存过,则直接选择 "保存" 即可。
你也可以使用快捷键 "Ctrl+S" 或 "Cmd+S" (在Mac电脑上) 来快速保存文件。无论你使用哪种方法,保存文件后,你的工作就已经被保存到你指定的位置了。
设置Jupyter Notebook文件存放位置
你可以按照以下步骤设置 Jupyter Notebook 文件的存放位置:
1. 打开终端或命令提示符。
2. 输入`jupyter notebook --generate-config`命令,生成 Jupyter Notebook 的配置文件。
3. 找到生成的配置文件的路径,通常是`~/.jupyter/jupyter_notebook_config.py`。
4. 使用文本编辑器打开配置文件。
5. 在配置文件中搜索`# c.NotebookApp.notebook_dir`,找到这一行并将其解除注释(删除开头的`#`)。
6. 将 `c.NotebookApp.notebook_dir` 的值设置为你想要的 Jupyter Notebook 文件存放位置的路径,例如:`c.NotebookApp.notebook_dir = '/path/to/notebooks'`,确保路径存在。
7. 保存配置文件并关闭编辑器。
8. 重新启动 Jupyter Notebook 服务器,你的文件将会存放在指定的位置。
现在你就可以将 Jupyter Notebook 文件存放在你指定的位置了。请注意,在设置存放位置之前,确保你已经安装并正确配置了 Jupyter Notebook。
阅读全文
相关推荐














