Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where should I place my settings and profiles for use with IPython/Jupyter 4.0?

I've recently updated IPython (to 4.0) and have started using Notebooks after a period of some time not using them (since before The Big Split, I think), and have discovered that some of my settings need to be modified and moved from ~/.ipython/ to ~/.jupyter/.

For example, it appears that the NotebookManager.notebook_dir in

~/.ipython/profile_default/ipython_notebook_config.py 

is ignored and has had its functionality replaced by FileContentsManager.root_dir in

~/.jupyter/jupyter_notebook_config.py 

Beyond isolated incidents like this, however, it's not clear to me how the configuration settings and profiles now work. In particular what files should be located where, and what they should contain. If, for example, I generate a new profile with

ipython profile create foo 

I now get different files than I used to (and than those present in my existing profiles): where I used to get

ipython_config ipython_notebook_config.py ipython_nbconvert_config.py 

I now get

ipython_config.py ipython_kernel_config.py 

and as near as I can tell, none of my ipython_notebook_config.py are used.

This (and the limited documentation) all leaves me a bit confused about where should I place my settings and profiles for use with IPython/Jupyter 4.0, specifically:

  1. Where should I place general notebook-related settings for use by all kernels/profiles? (I see that some go in ~/.jupyter/jupyter_notebook_config.py, but it's not clear to me whether these would override settings loaded from elsewhere.)
  2. Where should I place profile-specific settings for use with notebooks? (Can I continue to use ipython_notebook_config.py files in ~/.ipython/profile_someprofile/ directories?)
  3. Where should I place kernel-specific settings for use by all profiles and applications. (For example, where should settings used by IPython for all profiles in both the shell and notebooks go?)
  4. How should I modify or update existing IPython profiles for use with 4.0.0? (For example, should all have a ipython_kernel_config.py file; should I delete the ipython_notebook_config.py and ipython_nbconvert_config.py files?)

OS X 10.10.4; Xcode 6.4; CLT: 6.4.0.0.1; Clang: 6.1; Python Python 2.7.10 (Homebrew); Jupyter 4.0.4; IPython 4.0.0.

like image 377
orome Avatar asked Aug 18 '15 11:08

orome


People also ask

Where are JupyterLab settings stored?

JupyterLab User Settings Directory The user settings directory contains the user-level settings for Jupyter extensions. By default, the location is $HOME/. jupyter/lab/user-settings/ , where $HOME is the user's home directory.

What is the best way to use jupyter notebook?

The easiest way for a beginner to get started with Jupyter Notebooks is by installing Anaconda. Anaconda is the most widely used Python distribution for data science and comes pre-loaded with all the most popular libraries and tools.


1 Answers

First of all, check what's in your ~/.jupyter/ folder. Some of the comments under the question mention you have a file named "MIGRATED" that contains only a timestamp.

If you are in this state, run the command: jupyter notebook --generate-config which will create a new file ~/.jupyter/jupyter_notebook_config.py. If you already have this file, you don't need to run this command.

This file is where you put the code that will modify your IPython Notebook behavior. It's a fully commented out (and well documented) file.

I have a related question open (How do I get IPython profile behavior from Jupyter 4.x?) that deals with attempting to set up multiple profiles, which is currently unanswered.

like image 75
JBWhitmore Avatar answered Sep 23 '22 07:09

JBWhitmore