更改IPython / Jupyter笔记本工作目录 [英] Change IPython/Jupyter notebook working directory

查看:323
本文介绍了更改IPython / Jupyter笔记本工作目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我打开Jupyter笔记本(以前称为IPython)时,它默认为 C:\ Users \ USERNAME

When I open an Jupyter notebook (formerly IPython) it defaults to C:\Users\USERNAME.

如何将此更改为其他位置?

How can I change this so to another location?

谢谢。

推荐答案

jupyter notebook --help-all 可能有所帮助:

--notebook-dir=<Unicode> (NotebookManager.notebook_dir)
    Default: u'/Users/me/ipynbs'
    The directory to use for notebooks.

例如:

jupyter notebook --notebook-dir=/Users/yourname/folder1/folder2/

当然,如果需要,您可以在配置文件中设置它。您可能需要在Windows中转义反斜杠。

You can of course set it in your profiles if needed, you might need to escape backslash in Windows.

请注意,这将覆盖您可能设置的任何路径一个jupyter_notebook_config.py文件。 (您可以在其中设置变量 c.NotebookApp.notebook_dir ,这将是您的默认启动位置。)

Note that this will override whatever path you might have set in a jupyter_notebook_config.py file. (Where you can set a variable c.NotebookApp.notebook_dir that will be your default startup location.)

这篇关于更改IPython / Jupyter笔记本工作目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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