Skip to content

Terminology

Don Jayamanne edited this page Jan 20, 2022 · 1 revision

IPyKernel Jupyter Kernel Specifications
Kernels
NotebookControllers
Python Environments

IPyKernel

This is the Python package that supports the kernel protocol and is installed into a Python environment. I.e. to launch a Python process as a kernel, this package is required. All we need to do is run this package in the python environment at let that handle the event loop, its similar to launching a language server or the like for VS Code.

Jupyter

Jupyter is an Application packaged as a python package, installed into a Python environment. You can have multiple python environments, PythonA, PythonB, Conda Environment A, Conda Environment B, etc.. It can be launched a number of ways (CLI such as jupyter ..., python -m jupyter ...).

Kernel Specifications

JSON file with details about a kernel (name, description, CLI information required to launch a Process as a kernel)

Kernels

A process that run code on behalf of the user in Jupyter.

NotebookControllers

VS Code lists notebook controllers in the kernel pciker, that can be used to execute code against a notebook. VS Code doesn't prescribe how state is manage. Extension authors are free to span separate processes for each execution of a cell or seprate processes for each notebook, or have a single process for the entire VS Code session.

In Jupyter, we map Kernel specs to a Notebook controller. Thus the kernel picker lists kernel specifications, & when executing code, we start a kernel for that specific notebook. I.e. each kernel is used/owned by a notebook.

Python Environments

Python packages are stored in multiple locations, generally stored in a directory under the Python enviornment. E.g. if you have an Python environment named PythonA, you'll have your python pakcages stored in <PythonA Environment Directory/libs/...>. The exact folder structure isn't relevant. What is important is the fact that packages installed in PythonA will not be available in PythonB (note its possible to install them globally as well).

I.e. its similar to node.js, you can have separate node_modules folders. However in Python, (generally) these node_module folders sit right inside the individual environment.

Clone this wiki locally