type
status
date
slug
password
summary
tags
category
icon
Download that creepy costly dump plugin from marketplace.
- Currently this only works in the latest Insiders Version of VS Code (will be supported in the next release of VS Code and Jupyter extension)
- Install latest pre-release version of Jupyter Extension (a change in Jupyter extension is required to make this possible)
- Install the above extension https://marketplace.visualstudio.com/items?itemName=donjayamanne.vscode-default-python-kernel
From here on, all notebooks opened will have the
active Python environment
selected as the kernel.You can change the
Active Python Environment
for your workspace/globally using the command Python: Select Interpreter
You can find more information on the read me of the above extension.
Or just Hide all of the Python environments except the one you need.
- If you have n python environments and you only use one, then hide all of the others.
- If you have just Jupyter and Python extension, then the remaining Python env will be automatically selected (however if you have other remote jupyter kernels, or other extensions that contribute kernels, then this will not get selected automatically). Please see solution 2.
- Open a Jupyter ntoebook (to ensure the Jupyter extension gets activated)
- Open your settings.json file
- Add the setting
"jupyter.kernels.excludePythonEnvironments": [...]
and add the environments you wish to hide.

- Author:tom-ci
- URL:https://www.tomciheng.com//article/defaultJupyterkernelinvscode
- Copyright:All articles in this blog, except for special statements, adopt BY-NC-SA agreement. Please indicate the source!