3

I want to create a new jupyter file in any location of choice of my computer other than in the default folder. I am using windows 10. Just like any other applications, word, R etc, you have the choice to create and save it in anywhere but I could not figure out how to do that in jupyter.

Wasi Ahmad
  • 27,225
  • 29
  • 85
  • 140
  • Possible duplicate of [how to change jupyter start folder?](https://stackoverflow.com/questions/35254852/how-to-change-jupyter-start-folder) – Shihe Zhang Aug 28 '17 at 08:43

1 Answers1

3

When you are starting jupyter-notebook, first go to the desired directory where you want to create or save file and then start the notebook. Now, jupyter will run in that directory. You will be able to save your work (ex., ipynb files) in that directory.

I follow this whenever I work with jupyter notebook. I prefer this approach because in this way, you can start the jupyter-notebook in any desired directory.

You can see the official instruction to change the startup folder for jupyter-notebook in windows.

You can also do the following: using the jupyter notebook config file.

  • Open cmd and type jupyter notebook --generate-config

  • This writes a file to C:\Users\username.jupyter\jupyter_notebook_config

  • Change line 179. c.NotebookApp.notebook_dir = '' to c.NotebookApp.notebook_dir = 'your path'. [Make sure you use forward slashes in your path]

But you need to do this every time you want to start jupyter-notebook in a different directory. Thats why I don't prefer this approach (personal opinion).

You can this stackoverflow post too, in case if you get any help from it.

Community
  • 1
  • 1
Wasi Ahmad
  • 27,225
  • 29
  • 85
  • 140
  • I am not quite clear about what you said. After starting the Jupyter or create the file, how can I change working directory. – News_is_Selection_Bias Feb 11 '17 at 16:47
  • actually you cannot change the directory once you start jupyter (as far as i know). thats why go to your desired working directory first (through terminal) and then start jupyter-notebook. – Wasi Ahmad Feb 11 '17 at 17:05