Manage Jupyter Kernels in VS Code
The Visual Studio Code notebooks' kernel picker helps you to pick specific kernels for your notebooks. You can open the kernel picker by clicking on Select Kernel on the upper right-hand corner of your notebook or through the Command Palette with the Notebook: Select Notebook Kernel command.
Once you open the Kernel Picker, VS Code shows the most recently used (MRU) kernel(s):
Note: In the previous versions of VS Code (version <1.76), VS Code used to show all available kernels by default.
To see other kernels, you can click Select Another Kernel.... All existing kernels are categorized into kernel source options, with these sources supported by the Jupyter extension out of the box:
By default, VS Code will recommend the one you've previously used with your notebook, but you can choose to connect to any other Jupyter kernels as shown below. VS Code will also remember the last selected kernel for your notebooks, and will automatically select them the next time you open your notebook.
Jupyter Kernels
The Jupyter Kernels category lists all Jupyter kernels that VS Code detects in the context of the compute system it's operating in (your desktop, GitHub Codespaces, remote server, etc.). Each Jupyter kernel has a Jupyter kernel specification, or Jupyter kernelspec, which contains a JSON file (kernel.json
) with details about the kernel—name, description, and CLI information required to launch a process as a kernel.