In this post I’ll discuss how to change the Jupyter notebook startup folder in Anaconda which is installed on a Windows system. I find it easier to work in a startup folder where I keep all my development workspaces. So let’s get going and get this done.

Open the Anaconda Navigator and click on Environments -> base(root) -> Open Terminal

This will open a command prompt window. Type the command jupyter notebook –generate-config in the command window and press Enter. This will create a file with the name jupyter_notebook_config.py in the location C:\Users\YOUR_USERNAME\.jupyter

Go to the folder location C:\Users\YOUR_USERNAME\.jupyter and open the file named, jupyter_notebook_config.py in any text editor.

Everything in this config file will be commented on file creation. Search for the key string, #c.NotebookApp.notebook_dir

Uncomment the key string by deleting the # sign and in single quotes type the location of your custom startup folder and save the changes. Use forward slashes instead of backward slashes in the folder path. As an example, I’ve entered the location C:/jupyter_workspace. To verify that I am seeing the right workspace folder after done with all the changes, I’ve added a blank text file named, welcome_to_jupyter.txt in the folder.

To bring the changes into effect, restart Anaconda Navigator and launch Jupyter notebook. You should now see the startup folder changed to your supplied location.

How to change Jupyter notebook start up folder in Anaconda

29 thoughts on “How to change Jupyter notebook start up folder in Anaconda

  • November 13, 2021 at 7:53 AM
    Permalink

    It works for me. Thank you for sharing this!

  • August 2, 2021 at 8:40 PM
    Permalink

    You really helped with a nagging problem that I had when working with it

  • June 15, 2021 at 1:36 AM
    Permalink

    thanks a lot man i really do appreciate your help.
    really you saved my mood today.

  • May 3, 2021 at 7:20 PM
    Permalink

    It worked! Thanks!

  • March 11, 2021 at 3:38 AM
    Permalink

    thanks!! 🙂

  • January 7, 2021 at 7:02 PM
    Permalink

    Thanks a lot for this article, it worked for me.

  • September 24, 2020 at 5:51 PM
    Permalink

    Thank you so much, it works and this help a lot.

  • September 22, 2020 at 4:42 PM
    Permalink

    Thanks for the suggestion. It worked.

  • September 21, 2020 at 1:05 PM
    Permalink

    Thanks man

  • September 12, 2020 at 12:25 PM
    Permalink

    thanks. been trying to do this for ages

  • September 10, 2020 at 2:51 AM
    Permalink

    this works well

  • August 27, 2020 at 11:07 AM
    Permalink

    No worries! Good to know that it was useful.

  • August 26, 2020 at 8:06 PM
    Permalink

    God, you are my hero! Thanks for saving my time. Worked just perfectly.

    Cheers!

  • July 8, 2020 at 8:34 PM
    Permalink

    You will have to modify the “\” to “\\” in your windows file path.

  • June 25, 2020 at 9:48 AM
    Permalink

    You are welcome Brian! I’m glad my efforts are proving useful.

  • June 24, 2020 at 9:40 PM
    Permalink

    Many thanks – it worked fine once I corrected my error. I do appreciate the effort you put into this site, for the benefit of others.

  • June 24, 2020 at 9:07 PM
    Permalink

    Thanks for this. I’m just about to see if it works, now that I’ve got past an early trap for the unwary. You suggest entering jupyter notebook –generate-config at the command prompt and – being a novice – I didn’t realise that that should be: jupyter notebook –generate-config (that is, two hyphens rather than the one I typed).

  • June 7, 2020 at 4:00 AM
    Permalink

    Really useful. I have been wondering how to do this for a while. Thanks a lot.

  • April 28, 2020 at 1:33 AM
    Permalink

    Ok, at first I thought it wasnt’t working, then I went a bit deeper…

    This tutorial does work if Jupyter is launched from within Anaconda Navigator.
    If you, like me, use Start Menu shortcut the shortcut, then the shortcut itself needs to be edited.

    The destination should be changed from:
    C:\Users\d_abb\anaconda3\python.exe C:\Users\d_abb\anaconda3\cwp.py C:\Users\d_abb\anaconda3 C:\Users\d_abb\anaconda3\python.exe C:\Users\d_abb\anaconda3\Scripts\jupyter-notebook-script.py “%USERPROFILE%”

    To:

    C:\Users\d_abb\anaconda3\python.exe C:\Users\d_abb\anaconda3\cwp.py C:\Users\d_abb\anaconda3 C:\Users\d_abb\anaconda3\python.exe C:\Users\d_abb\anaconda3\Scripts\jupyter-notebook-script.py “C:/Whenever/You/Want/With/Forward/Spaces”

  • April 28, 2020 at 1:15 AM
    Permalink

    Doesn’t seem to work… Even after the change, Jupyter keeps starting om my default user folder.

  • March 12, 2020 at 5:14 AM
    Permalink

    Thank you!

  • February 23, 2020 at 1:36 AM
    Permalink

    Thank you but it doesnt work for my case.

  • January 17, 2020 at 7:37 AM
    Permalink

    Good explanation

  • November 16, 2019 at 11:16 AM
    Permalink

    Glad to know that! Thank you for your feedback.

  • November 16, 2019 at 8:13 AM
    Permalink

    Thank you, Mr. Gaur, for this post. It has been very useful to me at starting on Anaconda environment.

Comments, Questions or Suggestions: