Setup Jupyter notebook default folder in Anaconda

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 !

1 thought on “Setup Jupyter notebook default folder in Anaconda”

  1. 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!

Leave a Reply

Your email address will not be published. Required fields are marked *