我试着按照Jupyter笔记本文档上的说明去做。

不幸的是,我还没弄明白。这个“开始”的领域到底在哪里?

我有一个windows 7(64位)系统,安装了Anaconda3(不在C驱动器中)。我想改变Jupyter开始文件夹的位置。


当前回答

如果您正在使用jupyter lab并希望修改配置文件,则需要更新的参数为:

c.ServerApp。Root_dir = /path/to/directory/you/want

其他回答

我用的是Windows 10,不过是同一个版本的Anaconda。

Click on the Start Menu, then All Programs (just Programs for Win10) Click on the Anaconda3 folder; mine is Anaconda3 (64-bit) In there you should see Jupyter Notebook. If you have a virtual environment installed, it will be followed by the environment name like this: Jupyter Notebook (env) Right-click Jupyter Notebook entry and navigate to More => Open File Location Right-click the correct Jupyter Notebook entry, then click on Properties Enter a path in the Start in: box; if the path has spaces in it, you must enclose it in double quotes Delete "%USERPROFILE%" at the end of the executable path

首先试着跑步

jupyter notebook——notebook-dir="C:/您的/需要的/开始目录/"

在命令行(cmd)中查看Jupyter笔记本是否在所需的位置打开。

如果是,那么您可以通过以下方式使其成为一个快捷方式:

在Windows文件资源管理器或桌面上,右键单击>新建>快捷方式 输入以下位置,然后单击下一步:

jupyter notebook——notebook-dir="C:/您的/需要的/开始目录/"

为您的快捷方式输入一个名称并完成

现在你有一个快捷方式启动Jupyter在你想要的位置。这适用于Windows 7、macOS和Linux。 对于windows,最好用双引号将路径括起来,因为如果路径名中有空格,单引号将不起作用

注意,如果您发现错误提示路径无效,请尝试在路径中使用普通斜杠/而不是反斜杠\,例如 jupyter笔记本——notebook-dir="D:/"

您可以从conda命令行更改配置:

运行anaconda命令提示符 运行jupyter notebook—generate-config 你应该在家里创建一个目录。jupyter/,文件是jupyter_notebook_config.py 取消注释并编辑字段c.NotebookApp.notebook_dir

感谢克莱门特https://groups.google.com/a/continuum.io/forum/#!主题/蟒蛇/ gqRwT_SxGBw

如果你正在使用WinPython而不是anaconda,那么你需要导航到安装WinPython的目录,例如C:\WPy-3670\settings\.jupyter\jupyter_notebook_config.py

您需要编辑这个文件并找到这一行 # c.NotebookApp。Notebook_dir = "将其更改为例如。 c.NotebookApp。notebook_dir = 'D:/your_own_folder/ contains /jupyter_notes'

您还需要将反斜杠\改为正斜杠/。还要确保通过删除#来取消该行的注释

钻石笔记本和钻石实验室(且说

对于旧的Jupyter Notebook接口,安装在Notebook包中并作为Jupyter Notebook运行(请参阅下一节,以nbclassic安装并以Jupyter nbclassic运行,以及用于JupyterLab):

Open cmd (or Anaconda Prompt) and run jupyter notebook --generate-config. This writes a file to C:\Users\username\.jupyter\jupyter_notebook_config.py. Browse to the file location and open it in an Editor Search for the following line in the file: #c.NotebookApp.notebook_dir = '' Replace by c.NotebookApp.notebook_dir = '/the/path/to/home/folder/' Make sure you use forward slashes in your path and use /home/user/ instead of ~/ for your home directory, backslashes could be used if placed in double quotes even if folder name contains spaces as such : "D:\yourUserName\Any Folder\More Folders\" Remove the # at the beginning of the line to allow the line to execute

朱比特经典笔记本>= 3

最近nbclassic和JupyterLab >= 3使用c.ServerApp。root_dir而不是c.NotebookApp。Notebook_dir(和jupyter server—generate-config而不是jupyter notebook—generate-config)。

有关上下文,请参阅迁移指南和关于服务器和笔记本之间差异的问题。