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

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

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


当前回答

我用的是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

其他回答

我使用Anaconda2的windows 7(64位)。在开始菜单中,右键单击Jupyter Notebook ->属性。在Target字段中,将%USERPROFILE%更改为新的“D:\path”。

                         

我用的是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

截至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”,这对应于我用来存储笔记本文件的位置。这条路就是你要的。

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

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

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

然后运行命令jupyter notebook

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

对于旧的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)。

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