Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Open Jupyter Notebook from a Drive Other than C Drive

I have a machine learning project in drive D. It contains python notebook files. But when I launch jupyter notebook through command prompt, it only shows directories inside drive C. How can I navigate to a drive other than C drive without changing jupyter notebook startup path?. I'm using windows 10 operating system. All the solutions I found, trying to change notebook startup path.

like image 357
Thamindu DJ Avatar asked Mar 09 '19 14:03

Thamindu DJ


People also ask

How do I change where a jupyter notebook opens?

1. Change Jupyter Notebook startup folder (Windows) Copy the Jupyter Notebook launcher from the menu to the desktop. Right click on the new launcher and change the Target field, change %USERPROFILE% to the full path of the folder which will contain all the notebooks.

How do I change a folder to a D drive in jupyter notebook?

In the start menu, right click Jupyter Notebook -> Properties . In the Target field, change %USERPROFILE% to your new "D:\path" . I am using Anaconda 3 and Windows 10 and this answer is almost correct for that combo -- I used "E:/" rather than "D:\new path".


3 Answers

You can launch it from any drive/location you want with the --notebook-dir option.

For example:

jupyter notebook --notebook-dir=D:/
like image 133
Leo Brueggeman Avatar answered Oct 11 '22 20:10

Leo Brueggeman


Follow these steps:

  1. Open Anaconda Prompt
  2. Insert this command, jupyter notebook --notebook-dir=NameOfTheDrive:.

As Example for Drive D, jupyter notebook --notebook-dir=D:

like image 40
Rubel Avatar answered Oct 11 '22 21:10

Rubel


To permanently change the default directory of Jupyter do the following:

  • Look for the Shortcut to open Jupyter notebook.
  • Right Click on the Shortcut
  • Go to Properties.
  • Look for ....jupyter-notebook-script.py "%USERPROFILE%/"
  • Change %USERPROFILE%/ to the folder you wish.
  • Restart Jupyter notebook.
like image 27
Vikas Awasthi Avatar answered Oct 11 '22 20:10

Vikas Awasthi