How To: Change the default start directory for Jupyter Notebook
By default, the start directory for Jupyter Notebook used in ArcGIS API for Python is set to the following folder:
However, it is possible to start Jupyter Notebook with a different directory through the Python Command Prompt or by modifying the Jupyter Notebook .py configuration file.
Use one of the following solutions to start Jupyter Notebook in a different directory:
Temporarily start Jupyter Notebook in a different directory using the Python Command Prompt
- Start the Python Command Prompt. Click Start > ArcGIS > Python Command Pro.
- Run the following command. The command opens Jupyter Notebook with the defined directory.
jupyter notebook --notebook-dir [LOCATION]
Change the default directory by generating a config file
- Start the Python Command Prompt by clicking Start > ArcGIS > Python Command Prompt.
- Type the following command to create a config folder.
jupyter notebook --generate-config
- Navigate to the following folder location:
- Open the jupyter_notebook_config.py file using a text editor, for example, Notepad++.
- Search for the following comment, The directory to use for notebooks and kernels.
- Uncomment the line below it by removing the # symbol, and insert the desired directory. For example:
## The directory to use for notebooks and kernels. c.NotebookApp.notebook dir = 'D:\Temp'