I want everything organized like i have created a folder in ‘D’ drive to test Python scripts in Jupyter Notebooks. When starting jupyter notebook, it starts up in C:\Users\Sushanth
.
I am like “WHAT”, there should be a way to change this. There should be a config file or settings somewhere to change this.
This is the point, where i am more worked up in changing this directory than coding some python scripts
I google a bit and find out there are two ways to do this and in my head 3 ways get this done,
# Method 1 ( Dont start to try this just yet )
- Open “Anaconda prompt”. It should open up in the default directory
- Go into folder
.juypter
- Enter the below command and it will generate a file named
jupyter_notebook_config.py
- Open the file in Notepad. Find
c.NotebookApp.notebook_dir
. Its a commented line, so ’#’ found beginning of the line, delete it and add the path of your folder. Save the file. - Close the Jupyter Notebook and Close the Anaconda Terminal
- Open Jupyter Notebook again.
- Voila ( Nothing happened, it started in same old C:\Users\Sushanth directory )
# Method 2
- Go into the desired folder
- Enter the command
- Voila ( It works )
# Method 3
You installed Anaconda and started Jupyter Notebook to learn python. Does it matter actually where to you save it. Problem is even before starting Jupyter Notebook, you created a folder structure and decided to save your files there. Expectations. hmm.
Create a new folder in the default directory and start writing some scripts.
**Thats it for now, go PLAY **