I understand to change the Root or Default directory the following needs to be done:
Create Config file
Change the following in the config file:
Add the new directory to:
## The directory to use for notebooks and kernels. #c.NotebookApp.notebook_dir = ‘’
XXX
I could not find this
What I found in the config file was:
Line 944:
…c.ServerApp.preferred_dir = ‘D:\My Folder\A Jupyter’ {You can see I enterd the directory and removed the # in front}
Line 965:
…c.ServerApp.root_dir = ‘D:\My Folder\A Jupyter’
Line 915:
…c.ServerApp.notebook_dir = ‘D:\My Folder\A Jupyter’
Still, it has not changed the default location for files uploading and saving
Please advise how to change the default file open and save location on Jupyter 7.0.6
Yes, in version 7.x it is c.ServerApp, not c.NotebookApp. preferred_dir is the location where the file browser will start, root_dir is the directory up to which ouser can traverse.
Create Config file
How did you create it and where? Is it under one of the paths listed in jupyter --paths config section?
Yes it seems to pick up the path of the config file
FROM CMD
C:\Users\user>jupyter --paths
config:
C:\Users\user.jupyter
C:\Users\user\AppData\Roaming\Python\etc\jupyter
K:\Anaconda\etc\jupyter
C:\ProgramData\jupyter
Some of these folders do not exist, line 2 and 4
Line 3 K:.… does not contain a config file, however it has config folders with other stuff in it
I understand that you are editing jupyter_server_config.py file. Do you see any juypter_server_config.json file in these locations which could be overriding your config? Do you see your changes when you run jupyter server --show-config and jupyter notebook --show-config? These commands should show a list of “Loaded config files”.
In the mean time I googled it further and found the idea to enter the line in the config file that was not there. I have now 3 lines. Also re-installed Jupyter
The 3 lines:
c.ServerApp.root_dir = ‘D:\My Folder\Aandele\AJupyter\1 BuySell’
c.NotebookApp.notebook_dir = ‘D:\My Folder\Aandele\AJupyter\1 BuySell’
c.ServerApp.preferred_dir = ‘D:\My Folder\Aandele\AJupyter\1 BuySell’
2 run jupyter server --show-config :
I see the following line in there:
I found space infront of the c.xxxxxx, removed them, now I am getting the following error:
[W 2024-01-20 20:28:13.138 ServerApp] notebook | error linking extension: No such directory: ‘‘D:\My Folder\Aandele\AJupyter\x01 BuySell’’