Use Jupyter notebooks in VS Code
Updated August 29, 2026
VS Code can edit and run .ipynb files through its Jupyter extension. Install the extension from the official Microsoft publisher, open the project folder, and choose Select Kernel in the notebook toolbar.
The selected kernel is a Python environment, not merely the interpreter used by the VS Code terminal. If it is missing from the list, activate that environment and install/register ipykernel:
python -m pip install ipykernel
Run a cell, inspect its output, and use Restart Kernel when state has become confusing. A notebook can retain output and execution counts even when its current kernel has been restarted, so restart and run all cells before committing a result. Keep large generated outputs out of Git when they are not part of the report, and do not commit secrets stored in cells or environment files.
Sources
related.
Ruslan Osipov
About the author