
Understanding JupyterLab Kernels
Understanding JupyterLab Kernels 관련


JupyterLab's tools support you in your work. Although the tools are self-contained, by using some of them together, you get more out of them. This integration is probably JupyterLab's most powerful feature.
A good starting point when learning JupyterLab is for you to know what its basic components are and how to make them work together. The diagram below shows an overview of these:

This diagram may look overwhelming at first because there are several parts. Don't worry, you'll soon see their relevance. The arrows show how various components interact. These interactions are one of the great benefits of JupyterLab. You'll start with the central part of the application and the diagram: the kernel.
The most important component of your JupyterLab installation is its kernel. As you can see from the previous diagram, it's central to the application. Whenever you start a new Jupyter Notebook or console, you click a button that looks like this:

When you click the button, you start an instance of the JupyterLab kernel. This is a process that links your file to a console. The file can be any that contains code such as a notebook, a Python file, a Markdown file, or even a text file. The kernel passes the programming code from the file to the console. The console then runs the code and displays any output. In the case of a Jupyter Notebook, output gets displayed in the notebook itself.
Note
Anytime you read about kernels in the context of JupyterLab, it means a process that links a file to a console. In computing, the word kernel usually refers to the core of your computer's operating system that allows it to interact with hardware. This has nothing to do with the kernels that you'll use here, so don't confuse these different meanings.
Opening a Jupyter Notebook automatically opens a kernel for it. This is why you can immediately run code from within it. Kernels also allow you to run code embedded within other file types, such as Markdown files, as you'll learn later. The screenshot

If you look carefully at the output, then you'll see from the top part there are five open tabs:
Untitled8.ipynb
, a Jupyter Notebook that has been assigned automatically to a kernel.Console5
, a console that has been automatically assigned to a kernel.- The
untitled4.md
file, which has no kernel assigned to it. This Markdown file can contain code, but you won't be able to run it. - The
untitled5.md
file, which has had a console assigned to it and therefore also has a kernel assigned to it. You could run code contained within this Markdown file.
As you work through the rest of this tutorial, you'll see how important the kernel is.