32

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.

Community
  • 1
  • 1
orome
  • 45,163
  • 57
  • 202
  • 418
  • 1
    How did you get the `.jupyter` directory populated? Mine only has a file called `migrated`, with a timestamp of the migration. – tiago Aug 26 '15 at 19:57
  • @tiago: Good question. Mine had just `migrated` and (I don't think I did anything to add this; perhaps I generated a profile?) `jupyter_notebook_config.py`. That's all. – orome Aug 26 '15 at 21:42
  • Similar problem here. I noticed that independent of whether I start the notebook server with `ipython notebook --profile=profile_name` or `jupyter notebook --profile=profile_name`, I get a warning: `Unrecognized alias: '--profile=profile_name', it will probably have no effect.`. Note that the --profile option is included in the quotations. – frankundfrei Sep 03 '15 at 16:25

1 Answers1

18

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.

Community
  • 1
  • 1
JBWhitmore
  • 11,576
  • 10
  • 38
  • 52
  • Jupyter appears to expect (or at least use) some settings (for example custom CSS) in the `~/.ipython` directory, which seems to break the GUI/Kernel separation that was at the heat of The Big Split. – orome Sep 11 '15 at 11:07
  • 1
    @raxacoricofallapatorius did you figure out how to use different css for different profiles? jupyter seems to only expect it from profile_default – goofd Dec 16 '15 at 19:26
  • 1
    @jbwhitmore awesome jupyter replacing ipython fully, what I was expecting though not knowing where – imbr Nov 03 '16 at 13:30
  • I think this is bad advice. According to this link the "migrated" file means a new location has been used for configuration: http://jupyter.readthedocs.io/en/latest/migrating.html – Mr. Developerdude Aug 03 '17 at 09:04