Skip to content

Instantly share code, notes, and snippets.

@blink1073
Created May 8, 2017 15:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save blink1073/f340571190af07cb7756293b8a3f4d3e to your computer and use it in GitHub Desktop.
Save blink1073/f340571190af07cb7756293b8a3f4d3e to your computer and use it in GitHub Desktop.
JupyterLab Config Notes

Notebook:

Config - creates it in USER as needed unless otherwise configured

NbExtensions - installs in system unless given --user or --sys-prefix

ServerExtensions - installs in user unless given --sys-prefix

Config and data default to user then sys-prefix, then system

Pip:

  • User will overshadow system as needed
  • User will use system if needed

Precedence is sys-prefix, then user, then system in a venv with system and user then system when not in a venv

The point is that it can detect this fact

Conda:

  • Is always only sys-prefix

Okay, I'm back to: prefer sys-prefix for writability, unless configured otherwise.

Uninstall removes it from sys-prefix if it is installed there, or app-dir if it is installed there.

For conda and venv users, everything just works. For sys-level users, they set the environment flag. For advanced users, they get a coherent behavior.

The only bad behavior is that we can't write config on a system install unless configured to do so, but this can be handled by sys admins or advanced users.

jupyter lab -> looks for config and launches. If the user makes a settings change, try to generate config and bail if it does not work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment