Skip to content
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

Use ENV_JUPYTER_PATH as default system path for installing kernels #75

Closed
wants to merge 1 commit into from

Conversation

jdemeyer
Copy link
Contributor

When installing kernels using install_kernel_spec(), the default directory should be what distutils uses to install data files, which is not /usr/local/share but some directory based on sys.prefix. So, we should use ENV_JUPYTER_PATH instead of SYSTEM_JUPYTER_PATH for the system installation directory.

Apply this instead of jupyter/jupyter_core#61

@minrk
Copy link
Member

minrk commented Sep 25, 2015

sys.prefix is not a reliable indicator of where things should go, and it has the wrong value is many common cases as discussed in jupyter/jupyter_core#61.

@minrk
Copy link
Member

minrk commented Sep 25, 2015

That said, we could accept this change and push a patch to core that changes how ENV_JUPYTER_PATH is determined to actually get the information from distutils instead of the unreliable sys.prefix. I never like interacting with distutils, but it might be the right source of this information.

@pkgw
Copy link

pkgw commented Oct 15, 2015

If this is applied, a similar change should be made to _get_nbext_dir in notebook/nbextensions.py.

FWIW, in the Anaconda distribution, sys.prefix and friends have eminently reasonable values.

@minrk
Copy link
Member

minrk commented Oct 16, 2015

@pkgw yes, in envs sys.prefix should always be reliable. But that's not everywhere, and sys.prefix is definitely wrong in very common cases, so we would need to special-case those if we end up going this way.

@jdemeyer
Copy link
Contributor Author

jdemeyer commented Feb 7, 2016

I think this can be closed now.

@minrk minrk closed this Feb 7, 2016
@minrk minrk added this to the no action milestone Feb 7, 2016
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.

3 participants