Saturday, April 9, 2016

Configuring Anaconda

Recently, I installed Anaconda since I started to work more with python notebooks and wanted convenience of all machine learning and data wrangling python libraries to be loaded and properly configured...

When I launched Jupyter Notebook application, I saw a whole bunch of files and directories and I realized that it was using my home directory.

After some googling and trial and error, I was able to change the default launch directory that I can keep well organized and that won't clutter my Notebook app!

I ran following line to generate configuration file

$ jupyter notebook --generate-config
Writing default config to: /Users/<your_user>/.jupyter/jupyter_notebook_config.py

After that I was able to edit it to start my Notebook in a directory of my choice.

# The directory to use for notebooks and kernels.
c.NotebookApp.notebook_dir = '/opt/anaconda'

Launched the application through Anaconda Navigator and saw the desired directory used in the start up log

[I 23:49:08.661 NotebookApp] Serving notebooks from local directory: /opt/anaconda

Viola!

No comments:

Post a Comment