Change Jupyter Notebook Default Directory
There are three way to change the default (i.e., start-up) directory of jupyter notebook.
Solution #1
1. Use command line (aka, cmd), run the following command: this will generate a config file (jupyter_notebook_config.py), in your working location (C:\Users[Your Username].jupyter).
jupyter notebook --generate-config
2. Goto that location (C:\Users[Your Username].jupyter) and edit file jupyter_notebook_config.py as follow.
Find line:
## The directory to use for notebooks and kernels.
#c.NotebookApp.notebook_dir = ''
3. Delete the “#” and type your default directory inside the ”. (Make sure the directory is exist, or it may causes some troubles)
For example:
## The directory to use for notebooks and kernels.
c.NotebookApp.notebook_dir = 'E:\Default Jupyter Dir\'
Solution #2
1. Find the Jupyter Notebook execute file.
2. Right click the file
3. Find “properties” tab and click it; this will lead you to the “Jupyter Notebook Properties”
4. Check the pop-up window, and you should see “Start in” property.
5. Change the directory to your default directory, e.g., ‘E:\Default Jupyter Dir\’
Solution #3
This solution is based on Anaconda, since Jupyter Notebook load the profile from Anaconda.
You may see the following information from properties window if you had gone through Solution #2.
"Target: D:\Anaconda3\python.exe d:\Anaconda3\cwp.py d:\Anaconda3 "d:/Anaconda3/python.exe" "d:/Anaconda3/Scripts/jupyter-notebook-script.py" %USERPROFILE%"
1. Goto the Anaconda installed location.
2. Find the ‘etc’ directory in Anaconda.
3. Open file ‘jupyter_notebook_config.json’
4. Add your default directory to the ‘notebook_dir’.
Read More:
- Modify the default file location of the Jupiter notebook
- Ubuntu 16.04 modify jupyter default path
- How to solve the problem of creating notebook failed
- [Fixed]Error executing Jupyter command ‘notebook’: [Errno ‘jupyter-notebook’ not found] 2
- Nginx manager jupyter notebook v1.0.0 http websocket
- Anaconda Jupiter notebook kernel error solution
- InternalError: GPU sync failed
- Error importing keras in jupyter Notebook: modulenotfounderror: no module named ‘keras’ solution
- Exception: jupyter command Jupiter notebook not found
- In Python, import XXX does not report an error, but in IPython (Jupiter notebook)
- A solution to the kernel error of Jupiter notebook in Anaconda under Windows 10
- PIP report failed to create process
- Anaconda builds a new environment and installs sklearn, numpy and other modules
- Incomplete and “the Jupiter” distribution was not found
- Jupyter notebook couldn’t find CONDA’s virtual environment
- [Solved] socket.gaierror: [Errno 8] nodename nor servname provided, or not known
- Failed to create Anaconda Menus
- Error kernel restart: restart failed was reported in the background of jupyter notebook
- On the kernel error of jupyter notebook
- Bad file descriptor(C:\ci\zeromq 1602704446950\work\src\epoll.cpp:100)