简体   繁体   English

如果我从Windows启动/搜索菜单启动jupyter笔记本,Windows 10中的Jupyter Notebook默认目录设置不起作用

[英]Jupyter Notebook default directory setting in windows 10 doesn't work if i launch jupyter notebook from windows start/search menu

I want to change the default directory that Jupyter Notebook opens on. 我想更改Jupyter Notebook打开的默认目录。 My OS is windows 10. I changed the c.NotebookApp.notebook_dir setting in the jupyter_notebook_config.py file. 我的操作系统是Windows 10.我更改了jupyter_notebook_config.py文件中的c.NotebookApp.notebook_dir设置。 This works when I open Jupyter Notebooks thru Anaconda navigator, ie if I open Anaconda Navigator first and then launch Jupyter Notebooks from there. 当我通过Anaconda导航器打开Jupyter笔记本时,即如果我首先打开Anaconda Navigator,然后从那里启动Jupyter笔记本,这就有效。

MY problem is that when I launch jupyter notebook by typing it in the windows start/search menu, it does not open in the directory specified in the c.NotebookApp.notebook_dir setting in the jupyter_notebook_config.py file. 我的问题是,当我通过在Windows开始/搜索菜单中键入它来启动jupyter笔记本时,它不会在jupyter_notebook_config.py文件中的c.NotebookApp.notebook_dir设置中指定的目录中打开。

Any help on this will be appreciated. 任何有关这方面的帮助将不胜感激。 Thanks in advance! 提前致谢!

When you typing it in windows search box, you run the shortcut actually, even you had edit c.NotebookApp.notebook_dir setting, just right click the the shortcut and open the files location or edit the shortcut directly ex: C:\\Users\\user\\AppData\\Roaming\\Microsoft\\Windows\\Start Menu\\Programs\\Anaconda3 (64-bit)\\Jupyter Notebook.lnk , 当你在Windows搜索框中输入它时,你实际上运行了快捷方式,即使你已经编辑了c.NotebookApp.notebook_dir设置,只需右键单击快捷方式并打开文件位置或直接编辑快捷方式ex: C:\\Users\\user\\AppData\\Roaming\\Microsoft\\Windows\\Start Menu\\Programs\\Anaconda3 (64-bit)\\Jupyter Notebook.lnk

right click the properties of shortcut, you will see the target is 右键单击快捷方式的属性,您将看到目标是

C:\Users\user\Anaconda3\Scripts\jupyter-notebook-script.py "C:\Users\user",

delete the default value to 删除默认值为

C:\Users\user\Anaconda3\Scripts\jupyter-notebook-script.py

and run it, it will get the c.NotebookApp.notebook_dir setting 并运行它,它将获得c.NotebookApp.notebook_dir设置

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM