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

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

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


当前回答

简单的方法!

在开始菜单中输入jupyer notebook

2 -在jupyter笔记本电脑桌面上制作快捷方式(鼠标右键!)




3 -只拖放你最喜欢的文件夹在快捷方式

其他回答

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

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

CD导入目录或父目录(与打算的目录将工作嵌套在其中)。

注意它必须是一个文件夹(E:\>—这将不起作用)

然后运行命令jupyter notebook

截至2020年,对于Windows…

配置是用于miniconda的安装,但对于anaconda也是一样的。可以通过查看快捷方式的属性来修改它。链接的目标格式如下:

{1ch88ff88} {1ch88ff88} {1ch88ff88} {1ch88ff88} {1ch88ff88} {1ch88ff88} {1ch88ff88} {1ch88ff88} {1ch88ff88} {1ch88ff88} {1ch88ff88} {1ch88ff88} {1ch88ff88} {1ch88ff88} {1ch88ff88} {1ch88ff88} {1ch88ff88} {1ch88ff88} {1ch88ff88} {1ch88ff88} {1ch88ff88} {1ch88ff88} {1ch88ff88} {1ch88ff88

分为三个部分:

1:第一部分启动包装器

C: \用户\ A_User \ miniconda3 \ python . exe C: \用户\ A_User miniconda3 \ cwp . py

这个包装器确保第三部分(即实际的快捷方式)可以使用适当的配置执行,具体取决于选择的执行环境。代码在这里。

2:脚本文件夹的路径

脚本位于每个环境使用的文件夹的子文件夹Scripts中。给出所需环境的路径,包装器将完成其余工作。在我的情况下,我使用的基础环境:

C: \用户\ A_User \ miniconda3

这个片段被传递给脚本,该脚本将其标识为变量前缀,从变量计算出的完整路径,然后添加到环境变量path的开头,并替换CONDA_PREFIX的当前内容。

3:要执行的命令

这是前面的包装器要处理的命令:

C:用户\A_User\ python.exe:\用户\A_User\ \ scription \ ju_script .py“%用户资料%\文件文件\Jupyter”

它运行Python和Jupyter -notebook-script.py脚本来启动Jupyter notebook,并添加了特定的初始文件夹“%USERPROFILE%\Documents\Jupyter”,这对应于我用来存储笔记本文件的位置。这条路就是你要的。

路径可以根据使用和存储环境的特定配置和首选项进行调整。

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

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_config.py中,你必须把

#c.NotebookApp.notebook_dir='c:\\test\\your_root'

双\\是关键答案