Chadrick Blog

adding new kernel to jupyter

create a virutalenv and activate it.

then install ipykernel

once installed then run the following command

python -m ipykernel install --user --name <some_unique_name_for_kernel>

related doc:

once this is done, then you can see that this kernel is available in jupyter. It may take a few seconds for this to take into effect.

remember, run the above command when the virtualenv that you wish to add is activated.

What happens under the hood

jupyter is just a client and ipykernel is what receives workload from jupyter client and runs them.

then where are the multiple kernels of ipykernel stored?

by default it is stored in ~/.local/share/jupyter

The python -m ipykernel install xxx command does is simply add a kernel.json file under ~/.local/share/jupyter/kernels/<created kernel name> dir.

The kernel.json file content is simple and its purpose is designating the python env that the kernel uses.


 "argv": [
 "display_name": "new_kernel",
 "language": "python",
 "metadata": {
  "debugger": true

related docs: