bash_kernel
bash_kernel copied to clipboard
Remove kernelspec file on uninstall
When uninstalling with:
pip uninstall bash_kernel
the kernelspec directory & file is left behind, causing the bash kernel to still be offered in the Web UI and listed as an available kernel via the command line.
I'm not sure there's a good way to do that - installing the kernelspec files is something of a hack on the python packaging toolkit. E.g. I can't make wheels for bash_kernel and have them install the kernelspec.
Does the kernelspec file have to be dynamically generated? If it's a static file, would the uninstall be easier to manage?
No, I don't think that would be any easier to manage.
For reference, the reason it's dynamically created is so that it refers to the Python interpreter you used to install it. I originally had a static file using python3
as the interpreter name (because I mostly use Python 3 myself), and people on Python 2 complained that the kernelspec as installed wasn't working for them.
Hi @takluyver,
Nice work with this kernel, it's really useful!
Digging up this issue as I created a conda package for bash_kernel
, but not being able to fully uninstall is a real problem.
Hopefully using conda it is possible to use dedicated scripts to execute commands after installing, or before uninstalling. So it would be possible to remove the dynamically installed stuff automatically.
Is there a way to know exactly what the bash_kernel.install
step creates? Or even to undo it in a clean way?
For the record, clean uninstall is achieved with jupyter kernelspec uninstall bash
.
Use -f
flag for non-interactive use.
@payne92 I guess this issue could be closed.