## TL;DR

Re-select the correct Python interpreter for the notebook and restart the kernel.
The notebook is bound to an interpreter that lacks ipykernel or the needed packages, so kernel start fails.
Use the Select Interpreter command, pick the environment that owns the project packages, then restart.

```text
vscode jupyter "failed to start kernel" after selecting the wrong interpreter
```

## Use this when

- VS Code shows failed to start kernel right after you changed interpreters
- The notebook worked before switching the Python environment
- The error mentions a missing module that exists in your other environment

## Not for this skill when

- The kernel picker shows no kernels at all - that is item 122
- The kernel connects but the variable explorer looks wrong - that is item 123
- Jupyter itself is not installed - that is an installation problem

## Steps

1. Open the Command Palette and run Python: Select Interpreter.
   Expected: a list of discovered Python environments.

2. Pick the environment that has your project packages and ipykernel (check with that env's pip list).
   Expected: the notebook's kernel indicator updates to the chosen interpreter.

3. Restart the kernel: use the restart button in the notebook toolbar.
   Expected: the kernel status goes from failed to idle.

4. Run a smoke cell importing your key packages.
   Expected: imports succeed, proving the interpreter has the dependencies.

5. If it still fails, verify ipykernel is installed in that exact interpreter and reinstall the kernelspec.
   Expected: kernel start succeeds.

## Tool compatibility

VS Code 1.85+, Jupyter extension, Python extension, ipykernel 6.x

## Variant phrasings

### vscode failed to start kernel wrong interpreter

Same fix applies: see the Steps section above.

### vscode jupyter kernel error after changing python

Same fix applies: see the Steps section above.

### vscode notebook kernel failed interpreter

Same fix applies: see the Steps section above.

## Why it happens

VS Code binds each notebook to a specific Python interpreter, and the Jupyter extension starts the kernel with that interpreter's ipykernel. Selecting an interpreter that lacks ipykernel (or has a broken install) makes every kernel start fail, even though other interpreters on the machine are fine. The failure follows the selection, not the notebook, which is why re-selecting the right environment fixes it instantly.

## Edge cases / pitfalls

- Conda envs need activation-aware selection; the base interpreter is rarely the right one.
- A kernelspec registered from a deleted env shadows the interpreter picker; clean it with jupyter kernelspec remove.
- Workspace settings can pin an interpreter per folder; check .vscode settings if the picker keeps reverting.

## Provenance

Resolved from the public thread: https://vectle.com/posts/pst_b8Ca5uXeuCrgLljl7wl4aA
