I want to change Anaconda’s notebook startup folder.
I’ve been unable to do it despite the fact that I’ve read all the documentation that I’ve found. All my attempts at modifying “jupyter_notebook_config.py” have failed to change the startup folder. My last attempt at modifying it was:
Preferred starting directory to use for notebooks and kernels.
ServerApp.preferred_dir is deprecated in jupyter-server 2.0. Use
FileContentsManager.preferred_dir instead
Default: ‘’
c.ServerApp.preferred_dir = ‘D:/Neuro’
This was to try and place the startup directory in "D:/Neuro
I’ve tried everything from changing the ’ to ", / to \, doubling both types of slashes. I’ve closed down both my editor (Notepad++) and Anaconda Navigator each time. I’ve even uninstalled and reinstalled Anaconda. I’m in the base environment and have no other environments defined. The file itself is in c:\users\user name.juputer
I’m under Windows 11 Pro and the latest version of Anaconda; I must be doing something obviously wrong but I have know idea what.
Richard
Edited on Wednesday, 8 January 2025 at 13:21 (GMT + 1) à Paris, France;
sent later.
I have had success with setting “c.ServerApp.root_dir”. I use single forward slashes as you did: ‘D:/Neuro’.
The one caveat is: this only worked for starting Jupyter from the Anaconda Navigator. I have a Jupyter Notebook shortcut on the start menu, but it starts in the original root, not my preferred root.
Also: I’m using Windows 10, not 11.
Steven,
I have had success with setting “c.ServerApp.root_dir”. I use single forward slashes as you did: ‘D:/Neuro’.
The one caveat is: this only worked for starting Jupyter from the Anaconda Navigator. I have a Jupyter Notebook shortcut on the start menu, but it starts in the original root, not my preferred root.
Also: I’m using Windows 10, not 11.
I’ve kept looking around and last night found an even easier way where you don’t have to edit “c.ServerApp.root_dir” in order to change the startup directory for Jupyter notebooks.
Open your terminal in Anaconda Navigator (anaconda_prompt)
Navigate to the directory where you would like to save your notebook (can be done by a 1 or 2 line DOS macro).
Type the command “jupyter notebook”
The program will instantiate a local server at localhost:8888 (or another specified port).
Works very well under Windows 11.
Richard
Edited on Wednesday, 15 January 2025 at 10:40 (GMT + 1) à Paris, France;
sent later.