I had to perform a clean install of my computer and struggled to get Jupyter properly configured. The default folder is located on C:\, but all my files are in my cloud folder on another hard drive.
There is no way to easily change the default folder from Anaconda, so here’s how to proceed :
First, launch the command prompt from Anaconda by clicking on “Open Terminal” (from any environment)
The enter the following command : jupyter notebook –generate-config, and wait a few seconds :
This will create a file named “jupyter_notebook_config.py” in your user folder. Open this file and search for “#c.NotebookApp.notebook_dir = ‘‘
Do not forget to remove the # symbol to uncomment and insert the path to your notebooks folder, using forward slashes, e.g. D:/MyFiles/Notebooks/Python
Restart Anaconda and you’re done !
what about Ubuntu 18.4? it looks that it already comes with jupyter set in another path, and thus it doesn let me import libraries from anaconda…
sys.path
[”,
‘/usr/lib/python36.zip’,
‘/usr/lib/python3.6’,
‘/usr/lib/python3.6/lib-dynload’,
‘/usr/local/lib/python3.6/dist-packages’,
‘/usr/lib/python3/dist-packages’,
‘/usr/lib/python3/dist-packages/IPython/extensions’,
‘/home/javier/.ipython’]
Thx!
Doesn’t appear to work.
I got the file jupyter_notebook_config.py created in my c:\users\\.jupyter folder and did the change. but there is no difference when I load jupyter.
Please note that for windows at least, you MUST have a u infront of the directory. so for example the result should looks like:
c.NotebookApp.notebook_dir = u’C:/temp/Somewhere/Notebooks/’
I am having the same problem.
I am using the linux subsystem installed Windows on 10 and installed Anaconda3-2018.12-Linux-x86_64 from my desktop, since then the jupyter lab only starts from the desktop.
I did
jupyter notebook –generate-config
and changed “c.NotebookApp.notebook_dir” to the dir I want, but the Jupyter lab always starts from the desktop.
Thank you. Worked perfectly on Windows 10 without using the u’ before the drive name. Used double bar (\\) for each folder division.
Thanks for this useful comment 🙂
Thank you so much kind sir
Thanks this helped a lot
Works like a charm on windows 10
Works fine on windows 10 with below changes
– additional hypen(- sign) before generate
jupyter notebook -–generate-config
-folder path needs double \\
Doesn’t work for me:
tried:
c:\users\username\.jupyter –generate-config
c:users\username\jupyter\jupyter notebook generate — config
Got the same message:
c:users\username\jupyter\jupyter is not recognized as an internal or external or external command, operable program or batch file.
Worked for me! Thanks.
Worked well with double hyphen before generate (as the instructions said), being sure the u’ preceded the path, AND changing the backslashes (\) in the path to forward slashes (/).
In Windows it seems to help to delete %USERPROFILE% from Target field Jupyter Notebook Properties as described here https://github.com/jupyter/notebook/issues/2488 if you want to skip the the anaconda prompt and start directly
If you want to start from start menu instead of anaconda prompt you need to delete %USERPROFILE% from Target Field as described here https://github.com/jupyter/notebook/issues/2488
updated all the steps required in the path – https://github.com/jupyter/notebook/issues/2488