I am running a custom-configured Jupyterlab installation for our company. It is wired to Livy and Spark to provide PySpark and Spark kernels, which works fine.
However, there is still the default Python 3
Kernel I want to remove:
When dropping to a console into the pod and doing a jupyter kernelspec list
, I get, as expected:
Available kernels:
pysparkkernel /usr/local/share/jupyter/kernels/pysparkkernel
python3 /usr/local/share/jupyter/kernels/python3
sparkkernel /usr/local/share/jupyter/kernels/sparkkernel
When I jupyter kernelspec remove python3
, and reload Jupyterlab, the Python 3 Kernel is still there, and it reappears in the list:
Available kernels:
python3 /usr/local/lib/python3.8/dist-packages/ipykernel/resources
pysparkkernel /usr/local/share/jupyter/kernels/pysparkkernel
sparkkernel /usr/local/share/jupyter/kernels/sparkkernel
Even when I delete this /usr/local/lib/python3.8/dist-packages/ipykernel/resources
dir the kernel doesn't disappear.
Is it even possible to disable this default kernel or do I have to live with it?
Workaround
I got what I wanted by copying everything from the pysparkkernel
into the python3
dir and removing the pysparkkernel
, effectively making Jupyterlab think that the PySpark kernel is the default one.
While this works, I am still interested if this is the only way.