简体   繁体   中英

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. My OS is windows 10. I changed the c.NotebookApp.notebook_dir setting in the jupyter_notebook_config.py file. This works when I open Jupyter Notebooks thru Anaconda navigator, ie if I open Anaconda Navigator first and then launch Jupyter Notebooks from there.

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.

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 ,

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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