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

sage -n: Warn the user if user configuration shadows our kernels #33651

Closed
mkoeppe opened this issue Apr 6, 2022 · 16 comments
Closed

sage -n: Warn the user if user configuration shadows our kernels #33651

mkoeppe opened this issue Apr 6, 2022 · 16 comments

Comments

@mkoeppe
Copy link
Contributor

mkoeppe commented Apr 6, 2022

(from #33650 comment:7)

In https://doc.sagemath.org/html/en/installation/launching.html#setting-up-sagemath-as-a-jupyter-kernel-in-an-existing-jupyter-notebook-or-jupyterlab-installation we tell users to install the kernelspec of a Sage installation using jupyter kernelspec install --user.

But we forget to tell them that it will shadow the kernel invoked by sage -n globally (for every copy of Sage), unless --name is used to rename it from sagemath to something more specific.

In this ticket:

  • We adjust the documentation
  • We have sage -n issue a warning if the user configuration shadows the kernels

CC: @kwankyu @dimpase

Component: user interface

Author: Matthias Koeppe, Kwankyu Lee

Branch/Commit: 0add420

Reviewer: Kwankyu Lee, Matthias Koeppe

Issue created by migration from https://trac.sagemath.org/ticket/33651

@mkoeppe mkoeppe added this to the sage-9.6 milestone Apr 6, 2022
@mkoeppe

This comment has been minimized.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Apr 7, 2022

comment:2

This is how we can read out the kernel_spec.

sage: from jupyter_client.kernelspec import get_kernel_spec
sage: spec = get_kernel_spec('sagemath')
sage: spec.argv[0]
'/Users/mkoeppe/s/sage/sage-rebasing/worktree-gcc11/local/var/lib/sage/venv-python3.10/bin/sage'

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Apr 7, 2022

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Apr 7, 2022

Branch pushed to git repo; I updated commit sha1. New commits:

b4e7895src/bin/sage-notebook, src/sage/repl/ipython_kernel/install.py: Check that the [SageMath](../wiki/SageMath) kernel can be discovered

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Apr 7, 2022

Commit: b4e7895

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Apr 7, 2022

Author: Matthias Koeppe

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Apr 7, 2022

comment:6

(not really tested yet)

@kwankyu
Copy link
Collaborator

kwankyu commented Apr 7, 2022

Changed commit from b4e7895 to 0add420

@kwankyu
Copy link
Collaborator

kwankyu commented Apr 7, 2022

New commits:

0add420Some edits

@kwankyu
Copy link
Collaborator

kwankyu commented Apr 7, 2022

@kwankyu
Copy link
Collaborator

kwankyu commented Apr 7, 2022

Reviewer: Kwankyu Lee

@kwankyu
Copy link
Collaborator

kwankyu commented Apr 7, 2022

comment:8

Minor edits.

With my limited tests, it works well. I am positive.

@kwankyu
Copy link
Collaborator

kwankyu commented Apr 7, 2022

Changed reviewer from Kwankyu Lee to Kwankyu Lee, ...

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Apr 10, 2022

Changed author from Matthias Koeppe to Matthias Koeppe, Kwankyu Lee

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Apr 10, 2022

Changed reviewer from Kwankyu Lee, ... to Kwankyu Lee, Matthias Koeppe

@vbraun
Copy link
Member

vbraun commented May 20, 2022

Changed branch from public/33651 to 0add420

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

No branches or pull requests

3 participants