I am using Jupyter Notebook on Windows 7, and I want to set the default foler to D:. Currently, I have the following line in my jupyter_notebook_config.py:
c.NotebookApp.notebook_dir = 'D:/'
When I open Jupyter Notebook, in the browser I receive the following message:
404 : Not Found You are requesting a page that does not exist!
In the prompt, I get the following output:
[W 14:12:45.477 NotebookApp] ipywidgets package not installed. Widgets are unavailable.
[I 14:12:45.497 NotebookApp] Serving notebooks from local directory: D:/
[I 14:12:45.497 NotebookApp] 0 active kernels
[I 14:12:45.497 NotebookApp] The IPython Notebook is running at: http://localhost:8888/
[I 14:12:45.497 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[I 14:12:45.747 NotebookApp] Refusing to serve hidden directory, via 404 Error
[W 14:12:45.790 NotebookApp] 404 GET /tree (::1) 44.00ms referer=None
But, if I change my config file to point to a folder, eveything works fine. For example, the following line in config works:
c.NotebookApp.notebook_dir = 'D:/Dropbox'
Is there any way that I can set the Jupyter default folder to the root drive?
Refusing to serve hidden directory, via 404 Error
points to no write permissions on the drive.IF you change security permissions on your D:\, you can use it as a default folder for Jupyter Notebook. You have to turn off UAC (User Account Control settings) from the Windows Control Panel (it blocks programs from writing to the root directory for security, must login as Admin to turn it off). You'll have to run the program as Administrator. This guide here is probably the best way to do it: https://superuser.com/a/753068
Remember the UAC is there to prevent unauthorized apps from writing to your root directory, so probably not the best thing to turn off. You could alternatively map a directory as another drive letter if you're just doing the D:\ for convenience.
So in summary your error message is due to selecting a directory where Windows tries to protect you from viruses, and is locked out by apps unless you turn off those protections.