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

Add jupyter kernelspec list/remove --missing to list/remove all missing kernels. #1018

Open
wpk-nist-gov opened this issue Mar 13, 2024 · 0 comments

Comments

@wpk-nist-gov
Copy link

wpk-nist-gov commented Mar 13, 2024

I often install kernels from project virtualenvs (my-project/.venv/) that eventually get removed. I can manually remove a kernelspec with jupyter kernelspec remove my-project but forget to do this, then forget the missing kernel name, etc. Instead, I use a script that checks if the python executable the kernel points to exists, and if it doesn't, removes the kernel. A command jupyter kernelspec remove --missing would save users (myself) some pain.

Alternatively, it might be simpler to add jupyter kernelspec list --missing which would list out kernels with missing python interpreters, and a user can pipe this to jupyter kernelspec remove.

I'd be happy to attempt a PR with one or both of these features if you agree. Thanks!

@wpk-nist-gov wpk-nist-gov changed the title Add jupyter kernelspec remove --missing to remove all missing kernels. Add jupyter kernelspec list/remove--missing to list/remove all missing kernels. Mar 13, 2024
@wpk-nist-gov wpk-nist-gov changed the title Add jupyter kernelspec list/remove--missing to list/remove all missing kernels. Add jupyter kernelspec list/remove --missing to list/remove all missing kernels. Mar 13, 2024
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

No branches or pull requests

1 participant