1. anaconda prompt 中运行 jupyter notebook --generate-config 命令,将在 C:\Users\Thin'k\.jupyter文件下生成 jupyter_notebook_config.py 文件。
2.在jupyter_notebook_config.py 文件中,找c.NotebookApp.notebook_dir 这个变量,
(1)若该变量存在,则为该变量赋预设路径(删除变量前的#),如:c.NotebookApp.notebook_dir = 'E:\jupyter_Notebook'
(2)若该变量不存在,Ctrl + F,输入“c.ServerApp.root_dir =”,找到下图所示文字:
在“c.ServerApp.root_dir =”,下面加一行c.NotebookApp.notebook_dir = 'E:\jupyter_Notebook'
'E:\jupyter_Notebook'为目标路径

然后,在开始菜单中,点击Anaconda Navigator ,选择jupyter notebook,点击Launch,new下拉菜单下,新建Notebook,并进行重命名,即可改变jupyter notebook的工作路径。




本文指导如何在Anaconda环境中,通过`anacondaprompt`修改`jupyter_notebook_config.py`来设置JupyterNotebook的工作目录,以及如何通过AnacondaNavigator进行确认和应用新的路径。
3万+

被折叠的 条评论
为什么被折叠?



