How to disable the default Python 3 kernel?

954 views
Skip to first unread message

Andreas Hilboll

unread,
Dec 29, 2016, 1:19:21 PM12/29/16
to Project Jupyter
Hi all,

I managed to run Jupyterhub with batchspawner on our cluster. I
installed additional kernel specs for Python2 and Python3 (these take
care of loading some lmod modules before launching the
jupyterhub-singleserver process).

Currently, I therefore have three kernels in the "New" dropdown:

- Python 2 (LAMOSv0.1)
- Python 3
- Python 3 (LAMOSv0.1)

The first Python 3 kernel is the default kernel, the second one was
manually installed by me.

Question: How can I remove the default Python 3 kernel from the
dropdown list (or at least change its name to something like "Python 3
(default, don't use)")?

Cheers,
Andreas.


--
Dr. Andreas Hilboll

Center for Marine Environmental Sciences (MARUM)
- AND -
Institute of Environmental Physics (IUP)

University of Bremen

NW1 / S3132
Otto-Hahn-Allee 1
D-28359 Bremen
Germany

+49(0)421 218 62133 (phone)
+49(0)421 218 98 62133 (fax)
http://www.iup.uni-bremen.de/~hilboll

Matthias Bussonnier

unread,
Dec 29, 2016, 1:46:45 PM12/29/16
to jup...@googlegroups.com
HI Andreas,

I believe --KernelSpecManager.ensure_native_kernel=False at the command line or
c.KernelSpecManager.ensure_native_kernel=False in the global (or per
user) config file should do the trick.

Let me know if that does the trick for you.

Otherwise if the "Python 3" kernelspec have be installed you can find
it's location by:

$ jupyter kernelspec list
Available kernels:
....
python3 /usr/local/share/jupyter/kernels/python3
.....

Edit <above-path>/kernel.json and change `"display_name": "Python 3"`
to your liking to change the UI name.
--
M
> --
> You received this message because you are subscribed to the Google Groups "Project Jupyter" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to jupyter+u...@googlegroups.com.
> To post to this group, send email to jup...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/jupyter/6kk2aivbrt.fsf%40shaula.iup.uni-bremen.de.
> For more options, visit https://groups.google.com/d/optout.

Andreas Hilboll

unread,
Dec 29, 2016, 2:33:37 PM12/29/16
to jup...@googlegroups.com
Hi Matthias,

thanks a lot for your answer!

> I believe --KernelSpecManager.ensure_native_kernel=False at the command line or
> c.KernelSpecManager.ensure_native_kernel=False in the global (or per
> user) config file should do the trick.
>
> Let me know if that does the trick for you.

I just tried `--KernelSpecManager.ensure_native_kernel=False` at the
command line, which worked perfectly =)

> Otherwise if the "Python 3" kernelspec have be installed you can find
> it's location by:
>
> $ jupyter kernelspec list
> Available kernels:
> ....
> python3 /usr/local/share/jupyter/kernels/python3
> .....
>
> Edit <above-path>/kernel.json and change `"display_name": "Python 3"`
> to your liking to change the UI name.

In the directory of the default kernelspec, there is no `kernel.json`
file:

(root) [jupyter@web ~]$ jupyter kernelspec list
Available kernels:
python3 /home/jupyter/pyenv_client/lib/python3.5/site-packages/ipykernel/resources
bash /home/jupyter/pyenv_client/share/jupyter/kernels/bash
python2-lpy0.1 /home/jupyter/pyenv_client/share/jupyter/kernels/python2-lpy0.1
python3-lpy0.1 /home/jupyter/pyenv_client/share/jupyter/kernels/python3-lpy0.1
(root) [jupyter@web ~]$ ls /home/jupyter/pyenv_client/lib/python3.5/site-packages/ipykernel/resources
logo-32x32.png logo-64x64.png

Since I wanted to simply disable the default kernel, which worked thanks
to your help, I'm fine -- just wanted to let you know for future
reference.
Reply all
Reply to author
Forward
0 new messages