Skip to content

Configure JUPYTER_CONFIG_DIR and JUPYTER_CONFIG_PATH #946

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 12, 2021
Merged

Configure JUPYTER_CONFIG_DIR and JUPYTER_CONFIG_PATH #946

merged 1 commit into from
Mar 12, 2021

Conversation

larssp
Copy link
Contributor

@larssp larssp commented Mar 11, 2021

This defines the environment variables JUPYTER_CONFIG_DIR and JUPYTER_CONFIG_PATH which are described here.

They are set to %WINPYDIR%\etc\jupyter with this PR.

On Windows Jupyter searches for configuration files in %PROGRAMDATA%\jupyter\ and C:\Users\Username\.jupyter first, if the variables above are not defined. If one also has a "regular" Jupyter installation using these directories, the winpython environment may load configuration files from these locations and cause issues.
Apart from that, the winpython environment might place files here, which affects portability.

In my USB drive installation of winpython I also created an empty file in
%WINPYDIR%\etc\jupyter\jupyter_notebook_config.py
but I am not certain this is necessary. This will cause Jupyter to "find" a configuration file and not search any further.

Calling jupyter --paths will still list directories on C:, but at the end of the search queue.

Define the environment variables JUPYTER_CONFIG_DIR and JUPYTER_CONFIG_PATH. 
Otherwise, this will default to C:\Users\...\.jupyter, which may exist
@larssp
Copy link
Contributor Author

larssp commented Mar 12, 2021

I guess, #916 is related.
Is %WINPYDIR%\etc\jupyter the right place? In previous releases jupyter_notebook_config.py was located in %WINPYDIR%\settings\.jupyter.

@stonebig
Copy link
Contributor

ok, let see what it gives. thanks for the analysis and code.

@stonebig stonebig merged commit 359c30e into winpython:master Mar 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants