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

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

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


当前回答

你可以像这样制作windows bat文件。

D: (your dexired drive)
cd \Your\Desired\Start\Derectory
Jupyter notebook

保存为“JupyterNB.bat”(或任何你喜欢的),并双击它。

其他回答

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

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

一个不错的技巧是在Windows资源管理器中导航到你想要的开始文件夹:

点击文件 单击打开命令提示符 然后只需输入“jupyter notebook”并按enter键

很快就会弹出一个web浏览器,并显示正确的开始文件夹。

经过多次尝试,我终于做到了。下面是我提到的最简单的步骤:

Right click on the jupyter launcher icon from start menu or desktop or anaconda navigator Now you need to change 2 things on the screen: Add your path to both target and start in the properties window Caveats: a. Your path needs to be in the same drive as the drive in which jupyter is installed. Since mine was in C drive, I used the following path "C:/JupyterWorkLibrary" b. For target, at the end of the existing path, i.e, after sript.py", add this after a space. Some people have mentioned removing %USERPROFILE% from target. I did not come across this. Image for jupyter properties c. For start in, add the same path. I have used a path without spaces to avoid issues. I would also suggest stick to using path in double quotes anyways d.I have also used forward slashes in the path Now just launch the notebook. It should open into the right folder.

希望这能有所帮助。

PS:我确信还有其他的方法,这对我来说很有效。我甚至不确定上面提到的约束条件。只是有了这些步骤,我可以完成我的工作。

jupyter notebook --notebook-dir=%WORKING_DIR%,

where %WORKING_DIR% (H:\data\ML) -你要工作的目录

恕我直言,这是最简单的单行命令方式

如果你正在使用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'

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