IPython Notebook 保存位置 [英] IPython Notebook save location

查看:35
本文介绍了IPython Notebook 保存位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚启动了 IPython Notebook,我尝试使用保存"来保存我的进度.但是,它不是将 *.ipynb 保存在我当前的工作目录中,而是保存在我的 python/Scripts 文件夹中.有没有办法设置这个?

I just started IPython Notebook, and I tried to use "Save" to save my progress. However, instead of saving the *.ipynb in my current working directory, it is saved in my python/Scripts folder. Would there be a way to set this?

谢谢!

推荐答案

是的,您可以在配置文件配置中指定笔记本位置.由于它没有将它们保存到您启动笔记本的目录中,因此我假设您在配置文件中设置了此选项.您可以使用以下命令找到配置文件目录的路径:

Yes, you can specify the notebooks location in your profile configuration. Since it's not saving them to the directory where you started the notebook, I assume that you have this option set in your profile. You can find out the the path to the profiles directory by using:

$ ipython locate

在您的默认配置文件或您使用的配置文件中,编辑 ipython_notebook_config.py 文件并更改行:

Either in your default profile or in the profile you use, edit the ipython_notebook_config.py file and change the lines:

注意:如果您没有配置文件,或者配置文件文件夹不包含 ipython_notebook_config.py 文件,请使用 ipython profile create.

Note: In case you don't have a profile, or the profile folder does not contain the ipython_notebook_config.py file, use ipython profile create.

# The directory to use for notebooks.
c.NotebookManager.notebook_dir = u'/path/to/your/notebooks'

# The directory to use for notebooks.
c.FileNotebookManager.notebook_dir = u'/path/to/your/notebooks'

或者,如果您希望将笔记本保存在当前目录中,只需将它们注释掉即可.

Or just comment them out if you want the notebooks saved in the current directory.

更新(2014 年 4 月 11 日):在 IPython 2.0 中,配置文件中的属性名称已更改,因此现在是:

Update (April 11th 2014): in IPython 2.0 the property name in the config file changed, so it's now:

c.NotebookApp.notebook_dir = u'/path/to/your/notebooks'

这篇关于IPython Notebook 保存位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆