I\'ve jus installed anaconda and I see that it wants me to save my documents in my documents/python scripts
But I\'d rather save everything in my dropbox for easy ba
By default the directory where Jupyter was started is uses as a notebook directory. There are different situations where the IPython notebook directory change is necessary.
To change the default notebook directory for all IPython kernel sessions:
1.1. Open a command window and execute:
jupyter notebook --generate-config
This will generate .jupiter/jupyter_notebook_config.py
file under your home directory.
1.2. Find, un-comment and modify the following line in your jupyter_notebook_config.py
to point to the desired directory:
# c.NotebookApp.notebook_dir = ''
Next time you launch IPython, it will open with the notebook directory you specified. For example, you can make D:\Sandbox
to be your notebook directory:
c.NotebookApp.notebook_dir = 'D://Sandbox'
You can specify notebook directory per kernel session.
In my everyday work I use Anaconda and IPython notebooks from different locations, including USB sticks. This makes changing the default directory impractical. I start IPython notebook from the command line, specifying the notebook directory.
jupyter notebook --notebook-dir="D:\Sandbox"
For frequently used directories, I create a command file in the directory itself. The command launches IPython with current directory as notebook directory. Here is what it looks like in a Windows command file:
jupyter notebook --notebook-dir="%CD%"
For Windows, edit the shortcut command which starts Jupyter:
from: ..\Anaconda3\Scripts\jupyter-notebook-script.py %USERPROFILE%
to : ..\Anaconda3\Scripts\jupyter-notebook-script.py c:\your_project_workspace