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

ensure_native_kernel is ignored? #1461

Open
dhirschfeld opened this issue Oct 15, 2024 · 2 comments
Open

ensure_native_kernel is ignored? #1461

dhirschfeld opened this issue Oct 15, 2024 · 2 comments
Labels

Comments

@dhirschfeld
Copy link
Contributor

dhirschfeld commented Oct 15, 2024

Description

Passing --KernelSpecManager.ensure_native_kernel=False to jupyter lab has no effect and the native kernel is still shown in the UI.

Reproduce

jupyter lab --no-browser --ip 0.0.0.0 --KernelSpecManager.ensure_native_kernel=False 

Go to JupyterLab and observe the native kernel is still in the UI

Expected behavior

The native kernel isn't shown in the JupyterLab UI

Context

  • Ubuntu 22.04
  • Chrome 129.0.6668.100
  • Python 3.10.15
❯ pixi list | rg jupyter
jupyter-lsp                       2.2.5
jupyter_ai                        2.25.0
jupyter_ai_magics                 2.25.0
jupyter_app_launcher              0.3.0
jupyter_client                    8.6.3
jupyter_core                      5.7.2
jupyter_events                    0.10.0
jupyter_leaflet                   0.19.2
jupyter_server                    2.14.2
jupyter_server_proxy              4.4.0
jupyter_server_terminals          0.5.3
jupyterlab                        4.2.5
jupyterlab_deck                   0.2.0
jupyterlab_execute_time           3.2.0
jupyterlab_fonts                  3.0.0
jupyterlab_gist_it                0.2.1
jupyterlab_iframe                 0.5.0
jupyterlab_kernelspy              4.0.0
jupyterlab_lsp                    5.1.0
jupyterlab_miami_nights           0.4.2
jupyterlab_pygments               0.3.0
jupyterlab_rise                   0.42.0
jupyterlab_server                 2.27.3
jupyterlab_widgets                3.0.13
vegafusion_jupyter                1.6.9
@dhirschfeld
Copy link
Contributor Author

In a paroxysm of rage I nuked the default kernel:

❯ jupyter kernelspec list
Available kernels:
  python3    /opt/python/envs/dev310/.pixi/envs/default/share/jupyter/kernels/python3
  dev310     ~/.local/share/jupyter/kernels/dev310
  dev312     ~/.local/share/jupyter/kernels/dev312

❯ rm -rf /opt/python/envs/dev310/.pixi/envs/default/share/jupyter/kernels/python3/

..but upon starting JupyterLab the default kernel was still there! 😡

Checking the available kernels again now showed:

❯ jupyter kernelspec list
Available kernels:
  python3    /opt/python/envs/dev310/.pixi/envs/default/lib/python3.10/site-packages/ipykernel/resources
  dev310     ~/.local/share/jupyter/kernels/dev310
  dev312     ~/.local/share/jupyter/kernels/dev312

So the ipykernel had appeared in place of the share/jupyter/kernels/python3 kernel.

Now however, --KernelSpecManager.ensure_native_kernel=False worked to correctly hide the default (ipykernel) kernel! 🎉

@dhirschfeld
Copy link
Contributor Author

...so it seems something is installing a kernel in share/jupyter/kernels/python3/ which masks the default (ipykernel) kernel and which ignores the command line flag --KernelSpecManager.ensure_native_kernel=False.

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

No branches or pull requests

1 participant