Skip to content

Kernel crashes when trying to plot matplotlib figure #17142

@josenino95

Description

@josenino95

Applies To

  • Notebooks (.ipynb files)
  • Interactive Window and/or Cell Scripts (.py files with #%% markers)

What happened?

Every time I try to run a cell with a matplotlib figure, the Kernel crashes. The exact message I get is this:

The Kernel crashed while executing code in the current cell or a previous cell.
Please review the code in the cell(s) to identify a possible cause of the failure.
Click here for more info.
View Jupyter log for further details.

I minimal reproducible example in my environment that crashes the Kernel is this code

import matplotlib.pyplot as plt
import numpy as np

x = np.array([0, 1, 2, 3, 4, 5])
y = np.array([0, 2, 4, 6, 8, 10])
plt.plot(x, y)
plt.show()

VS Code Version

Version: 1.105.1 (user setup) Commit: 7d842fb85a0275a4a8e4d7e040d2625abbf7f084 Date: 2025-10-14T22:33:36.618Z Electron: 37.6.0 ElectronBuildId: 12502201 Chromium: 138.0.7204.251 Node.js: 22.19.0 V8: 13.8.258.32-electron.0 OS: Windows_NT x64 10.0.22631

Jupyter Extension Version

Installation Identifier ms-toolsai.jupyter Version 2025.9.1 Last Updated 6 days ago Size 17.16MB

Jupyter logs

Visual Studio Code (1.105.1, undefined, desktop)
Jupyter Extension Version: 2025.9.1.
Python Extension Version: 2025.16.0.
Python Environment Extension Version: 1.10.0.
Pylance Extension Version: 2025.9.1.
Platform: win32 (x64).
Home = c:\Users\jmuriel
Temp Storage folder ~\AppData\Roaming\Code\User\globalStorage\ms-toolsai.jupyter\version-2025.9.1
Workspace folder ~\Documents\python_test
16:16:00.161 [info] Starting Kernel (Python Path: ~\Documents\python_test\.pixi\envs\default\python.exe, Unknown, 3.14.0) for '~\Documents\python_test\code\whatsapp_analysis.ipynb' (disableUI=true)
16:16:30.576 [warn] Failed to get activated env vars for ~\Documents\python_test\.pixi\envs\default\python.exe in 30374ms
16:16:30.581 [warn] Failed to get activated env vars for ~\Documents\python_test\.pixi\envs\default\python.exe in 30426ms
16:16:30.588 [info] Process Execution: ~\Documents\python_test\.pixi\envs\default\python.exe -c "import site;print("USER_BASE_VALUE");print(site.USER_SITE);print("USER_BASE_VALUE");"
16:16:30.644 [info] Process Execution: ~\Documents\python_test\.pixi\envs\default\python.exe -c "import ipykernel; print(ipykernel.__version__); print("5dc3a68c-e34e-4080-9c3e-2a532b2ccb4d"); print(ipykernel.__file__)"
16:16:30.649 [info] Process Execution: ~\Documents\python_test\.pixi\envs\default\python.exe ~\.vscode\extensions\ms-toolsai.jupyter-2025.9.1-win32-x64\pythonFiles\vscode_datascience_helpers\kernel_interrupt_daemon.py --ppid 9492
    > cwd: ~\.vscode\extensions\ms-toolsai.jupyter-2025.9.1-win32-x64\pythonFiles\vscode_datascience_helpers
16:16:30.654 [info] Process Execution: ~\Documents\python_test\.pixi\envs\default\python.exe -m pip list
16:16:32.208 [info] Process Execution: ~\Documents\python_test\.pixi\envs\default\python.exe -m ipykernel_launcher --f=~\AppData\Roaming\jupyter\runtime\kernel-v341053a976278c3764a11d48f17a7afea8cad1ca5.json
    > cwd: ~\Documents\python_test\code
16:16:42.201 [info] Kernel successfully started
16:21:40.344 [warn] Failed to get activated env vars for ~\Documents\python_test\.pixi\envs\default\python.exe in 30029ms
16:21:40.350 [info] Process Execution: ~\Documents\python_test\.pixi\envs\default\python.exe ~\.vscode\extensions\ms-toolsai.jupyter-2025.9.1-win32-x64\pythonFiles\printJupyterDataDir.py
16:22:27.911 [error] Disposing session as kernel process died ExitCode: 3228369023, Reason:

Coding Language and Runtime Version

Python v3.14.0

Language Extension Version (if applicable)

No response

Anaconda Version (if applicable)

Not using Anaconda, but pixi instead

Running Jupyter locally or remotely?

Local

Metadata

Metadata

Assignees

Labels

bugIssue identified by VS Code Team member as probable bug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions