2

I was trying to change the default starting directory of Anaconda Jupyter notebook on Windows 10

  • Conda version 4.3.31
  • Jupyter notebook version 5.2.2

From this link, I learned that I need to change c.NotebookApp.notebook_dir attribute to change the default directory.

I executed jupyter --config-dir to find the location of the configuration file and executed jupyter notebook --generate-config to generate the configuration file and changed c.NotebookApp.notebook_dir value to the directory I want.

Now if I run jupyter notebook command in cmd, it will start in the directory I mentioned. But if I run from the start menu, it is starting in the default folder.

Does anyone know why this is happening? I tried to change the path in the Start in field in shortcut properties of Jupyter Notebook. After doing that, I am not able to open from the start menu. When I click the Icon, it just opens and closes immediately.

darkavenger
  • 435
  • 3
  • 11
  • In Windows you can change the default directory for Jupyter, but you can't navigate to another drive - Dare you! Here's why you are facing this problem: https://github.com/jupyter/notebook/issues/1334 Life shouldn't be so hard, right? So I would recommend switching to Linux/Mac OS. 1) Then you don't need Anaconda anymore, as everything works with pip and brew. 2) You can always start your jupyter notebook from root or whichever directory you like. Nothing is easier. – TinaW Jan 05 '18 at 20:33

1 Answers1

1

I have (had) the same problem.

My workaround:

  • Anaconda (version 2018.12) installed in

    C:\Anaconda3

  • When running from Start Menu right click on Jupyter Notebook. In my case there follow two more submenus. The first is More and the second is something like Open folder (I have a German Windows version, so I just can guess the English Menu texts.).

  • When opening that folder you will see a file (shortcut) with the name Jupyter Notebook. The folder in my case looks like this:

    C:\Users\Andreas\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Anaconda3 (64- bit)

  • Right click this file (shortcut) and edit its properties. There you find the Target of the shortcut, which in my case is (rather longish):

    C:\Anaconda3\python.exe C:\Anaconda3\cwp.py C:\Anaconda3 C:\Anaconda3\python.exe C:\Anaconda3\Scripts\jupyter-notebook-script.py "D:\Dropbox\ipython_notebooks"

where I edited the last entry, which is the folder where I store my notebooks.

chiefenne
  • 452
  • 1
  • 12
  • 18