Skip to content

[Bug]: Matplotlib crashes kernel on fresh (windows) install #30501

@simonrp84

Description

@simonrp84

Bug summary

Hello,
I recently encountered a problem whereby Matplotlib crashes the jupyter kernel on my windows machine. I can reproduce it in a fresh environment.

Code for reproduction

Steps:

  1. Install python from miniforge
  2. Install jupyter and matplotlib with mamba install jupyter notebook matplotlib
  3. In a new notebook, run the following:
import matplotlib.pyplot as plt
plt.plot([0, 1], [0, 1])

Actual outcome

I see the following text below the notebook cell:
[<matplotlib.lines.Line2D at 0x15c107bafd0>]
And then after a few seconds a message pops up saying:
The kernel appears to have died. It will restart automatically.

I see no debug messages or anything else to help diagnose the problem.

Expected outcome

A simple matplotlib plot to appear, with a line between (0, 0) and (1, 1).

Additional information

This worked until very recently. Below are the installed packages listed by mamba list:

  Name                           Version                Build                  Channel
--------------------------------------------------------------------------------------------
  _openmp_mutex                  4.5                    2_gnu                  conda-forge
  _python_abi3_support           1.0                    hd8ed1ab_2             conda-forge
  anyio                          4.10.0                 pyhe01879c_0           conda-forge
  argon2-cffi                    25.1.0                 pyhd8ed1ab_0           conda-forge
  argon2-cffi-bindings           25.1.0                 py313h5ea7bf4_0        conda-forge
  arrow                          1.3.0                  pyhd8ed1ab_1           conda-forge
  asttokens                      3.0.0                  pyhd8ed1ab_1           conda-forge
  async-lru                      2.0.5                  pyh29332c3_0           conda-forge
  attrs                          25.3.0                 pyh71513ae_0           conda-forge
  babel                          2.17.0                 pyhd8ed1ab_0           conda-forge
  beautifulsoup4                 4.13.5                 pyha770c72_0           conda-forge
  bleach                         6.2.0                  pyh29332c3_4           conda-forge
  bleach-with-css                6.2.0                  h82add2a_4             conda-forge
  brotli                         1.1.0                  hfd05255_4             conda-forge
  brotli-bin                     1.1.0                  hfd05255_4             conda-forge
  brotli-python                  1.1.0                  py313hfe59770_4        conda-forge
  bzip2                          1.0.8                  h2466b09_7             conda-forge
  ca-certificates                2025.8.3               h4c7d964_0             conda-forge
  cached-property                1.5.2                  hd8ed1ab_1             conda-forge
  cached_property                1.5.2                  pyha770c72_1           conda-forge
  cairo                          1.18.4                 h5782bbf_0             conda-forge
  certifi                        2025.8.3               pyhd8ed1ab_0           conda-forge
  cffi                           1.17.1                 py313ha7868ed_0        conda-forge
  charset-normalizer             3.4.3                  pyhd8ed1ab_0           conda-forge
  colorama                       0.4.6                  pyhd8ed1ab_1           conda-forge
  comm                           0.2.3                  pyhe01879c_0           conda-forge
  contourpy                      1.3.3                  py313hf069bd2_2        conda-forge
  cpython                        3.13.5                 py313hd8ed1ab_102      conda-forge
  cycler                         0.12.1                 pyhd8ed1ab_1           conda-forge
  debugpy                        1.8.16                 py313h927ade5_0        conda-forge
  decorator                      5.2.1                  pyhd8ed1ab_0           conda-forge
  defusedxml                     0.7.1                  pyhd8ed1ab_0           conda-forge
  double-conversion              3.3.1                  he0c23c2_0             conda-forge
  exceptiongroup                 1.3.0                  pyhd8ed1ab_0           conda-forge
  executing                      2.2.0                  pyhd8ed1ab_0           conda-forge
  font-ttf-dejavu-sans-mono      2.37                   hab24e00_0             conda-forge
  font-ttf-inconsolata           3.000                  h77eed37_0             conda-forge
  font-ttf-source-code-pro       2.038                  h77eed37_0             conda-forge
  font-ttf-ubuntu                0.83                   h77eed37_3             conda-forge
  fontconfig                     2.15.0                 h765892d_1             conda-forge
  fonts-conda-ecosystem          1                      0                      conda-forge
  fonts-conda-forge              1                      0                      conda-forge
  fonttools                      4.59.2                 py313hd650c13_0        conda-forge
  fqdn                           1.5.1                  pyhd8ed1ab_1           conda-forge
  freetype                       2.13.3                 h57928b3_1             conda-forge
  graphite2                      1.3.14                 hac47afa_2             conda-forge
  h11                            0.16.0                 pyhd8ed1ab_0           conda-forge
  h2                             4.3.0                  pyhcf101f3_0           conda-forge
  harfbuzz                       11.4.4                 h5f2951f_0             conda-forge
  hpack                          4.1.0                  pyhd8ed1ab_0           conda-forge
  httpcore                       1.0.9                  pyh29332c3_0           conda-forge
  httpx                          0.28.1                 pyhd8ed1ab_0           conda-forge
  hyperframe                     6.1.0                  pyhd8ed1ab_0           conda-forge
  icu                            75.1                   he0c23c2_0             conda-forge
  idna                           3.10                   pyhd8ed1ab_1           conda-forge
  importlib-metadata             8.7.0                  pyhe01879c_1           conda-forge
  ipykernel                      6.30.1                 pyh3521513_0           conda-forge
  ipython                        9.5.0                  pyh6be1c34_0           conda-forge
  ipython_genutils               0.2.0                  pyhd8ed1ab_2           conda-forge
  ipython_pygments_lexers        1.1.1                  pyhd8ed1ab_0           conda-forge
  ipywidgets                     8.1.7                  pyhd8ed1ab_0           conda-forge
  isoduration                    20.11.0                pyhd8ed1ab_1           conda-forge
  jedi                           0.19.2                 pyhd8ed1ab_1           conda-forge
  jinja2                         3.1.6                  pyhd8ed1ab_0           conda-forge
  json5                          0.12.1                 pyhd8ed1ab_0           conda-forge
  jsonpointer                    3.0.0                  py313hfa70ccb_1        conda-forge
  jsonschema                     4.25.1                 pyhe01879c_0           conda-forge
  jsonschema-specifications      2025.4.1               pyh29332c3_0           conda-forge
  jsonschema-with-format-nongpl  4.25.1                 he01879c_0             conda-forge
  jupyter                        1.1.1                  pyhd8ed1ab_1           conda-forge
  jupyter-lsp                    2.3.0                  pyhcf101f3_0           conda-forge
  jupyter_client                 8.6.3                  pyhd8ed1ab_1           conda-forge
  jupyter_console                6.6.3                  pyhd8ed1ab_1           conda-forge
  jupyter_core                   5.8.1                  pyh5737063_0           conda-forge
  jupyter_events                 0.12.0                 pyh29332c3_0           conda-forge
  jupyter_server                 2.17.0                 pyhcf101f3_0           conda-forge
  jupyter_server_terminals       0.5.3                  pyhd8ed1ab_1           conda-forge
  jupyterlab                     4.4.6                  pyhd8ed1ab_0           conda-forge
  jupyterlab_pygments            0.3.0                  pyhd8ed1ab_2           conda-forge
  jupyterlab_server              2.27.3                 pyhd8ed1ab_1           conda-forge
  jupyterlab_widgets             3.0.15                 pyhd8ed1ab_0           conda-forge
  kiwisolver                     1.4.9                  py313h1a38498_1        conda-forge
  krb5                           1.21.3                 hdf4eb48_0             conda-forge
  lark                           1.2.2                  pyhd8ed1ab_1           conda-forge
  lcms2                          2.17                   hbcf6048_0             conda-forge
  lerc                           4.0.0                  h6470a55_1             conda-forge
  libblas                        3.9.0                  34_h5709861_mkl        conda-forge
  libbrotlicommon                1.1.0                  hfd05255_4             conda-forge
  libbrotlidec                   1.1.0                  hfd05255_4             conda-forge
  libbrotlienc                   1.1.0                  hfd05255_4             conda-forge
  libcblas                       3.9.0                  34_h2a3cdd5_mkl        conda-forge
  libclang13                     21.1.0                 default_hadf22e1_0     conda-forge
  libdeflate                     1.24                   h76ddb4d_0             conda-forge
  libexpat                       2.7.1                  hac47afa_0             conda-forge
  libffi                         3.4.6                  h537db12_1             conda-forge
  libfreetype                    2.13.3                 h57928b3_1             conda-forge
  libfreetype6                   2.13.3                 h0b5ce68_1             conda-forge
  libgcc                         15.1.0                 h1383e82_4             conda-forge
  libglib                        2.84.3                 h1c1036b_0             conda-forge
  libgomp                        15.1.0                 h1383e82_4             conda-forge
  libhwloc                       2.12.1                 default_h88281d1_1000  conda-forge
  libiconv                       1.18                   hc1393d2_2             conda-forge
  libintl                        0.22.5                 h5728263_3             conda-forge
  libjpeg-turbo                  3.1.0                  h2466b09_0             conda-forge
  liblapack                      3.9.0                  34_hf9ab0e9_mkl        conda-forge
  liblzma                        5.8.1                  h2466b09_2             conda-forge
  libmpdec                       4.0.0                  h2466b09_0             conda-forge
  libpng                         1.6.50                 h7351971_1             conda-forge
  libsodium                      1.0.20                 hc70643c_0             conda-forge
  libsqlite                      3.50.4                 hf5d6505_0             conda-forge
  libtiff                        4.7.0                  h550210a_6             conda-forge
  libwebp-base                   1.6.0                  h4d5522a_0             conda-forge
  libwinpthread                  12.0.0.r4.gg4f2fc60ca  h57928b3_9             conda-forge
  libxcb                         1.17.0                 h0e4246c_0             conda-forge
  libxml2                        2.13.8                 h741aa76_1             conda-forge
  libxslt                        1.1.43                 h25c3957_0             conda-forge
  libzlib                        1.3.1                  h2466b09_2             conda-forge
  llvm-openmp                    21.1.0                 hfa2b4ca_0             conda-forge
  markupsafe                     3.0.2                  py313hb4c8b1a_1        conda-forge
  matplotlib                     3.10.5                 py313hfa70ccb_0        conda-forge
  matplotlib-base                3.10.5                 py313he1ded55_0        conda-forge
  matplotlib-inline              0.1.7                  pyhd8ed1ab_1           conda-forge
  mistune                        3.1.4                  pyhcf101f3_0           conda-forge
  mkl                            2024.2.2               h57928b3_16            conda-forge
  munkres                        1.1.4                  pyhd8ed1ab_1           conda-forge
  nbclassic                      1.3.1                  pyhe01879c_0           conda-forge
  nbclient                       0.10.2                 pyhd8ed1ab_0           conda-forge
  nbconvert-core                 7.16.6                 pyh29332c3_0           conda-forge
  nbformat                       5.10.4                 pyhd8ed1ab_1           conda-forge
  nest-asyncio                   1.6.0                  pyhd8ed1ab_1           conda-forge
  notebook                       7.4.5                  pyhd8ed1ab_0           conda-forge
  notebook-shim                  0.2.4                  pyhd8ed1ab_1           conda-forge
  numpy                          2.3.2                  py313hce7ae62_2        conda-forge
  openjpeg                       2.5.3                  h24db6dd_1             conda-forge
  openssl                        3.5.2                  h725018a_0             conda-forge
  overrides                      7.7.0                  pyhd8ed1ab_1           conda-forge
  packaging                      25.0                   pyh29332c3_1           conda-forge
  pandocfilters                  1.5.0                  pyhd8ed1ab_0           conda-forge
  parso                          0.8.5                  pyhcf101f3_0           conda-forge
  pcre2                          10.45                  h99c9b8b_0             conda-forge
  pickleshare                    0.7.5                  pyhd8ed1ab_1004        conda-forge
  pillow                         11.3.0                 py313h641beac_0        conda-forge
  pip                            25.2                   pyh145f28c_0           conda-forge
  pixman                         0.46.4                 h5112557_1             conda-forge
  platformdirs                   4.4.0                  pyhcf101f3_0           conda-forge
  prometheus_client              0.22.1                 pyhd8ed1ab_0           conda-forge
  prompt-toolkit                 3.0.52                 pyha770c72_0           conda-forge
  prompt_toolkit                 3.0.52                 hd8ed1ab_0             conda-forge
  psutil                         7.0.0                  py313h5ea7bf4_1        conda-forge
  pthread-stubs                  0.4                    h0e40799_1002          conda-forge
  pure_eval                      0.2.3                  pyhd8ed1ab_1           conda-forge
  pycparser                      2.22                   pyh29332c3_1           conda-forge
  pygments                       2.19.2                 pyhd8ed1ab_0           conda-forge
  pyparsing                      3.2.3                  pyhe01879c_2           conda-forge
  pyside6                        6.9.2                  py313hd8d090c_1        conda-forge
  pysocks                        1.7.1                  pyh09c184e_7           conda-forge
  python                         3.13.5                 h7de537c_102_cp313     conda-forge
  python-dateutil                2.9.0.post0            pyhe01879c_2           conda-forge
  python-fastjsonschema          2.21.2                 pyhe01879c_0           conda-forge
  python-gil                     3.13.5                 h4df99d1_102           conda-forge
  python-json-logger             2.0.7                  pyhd8ed1ab_0           conda-forge
  python_abi                     3.13                   8_cp313                conda-forge
  pytz                           2025.2                 pyhd8ed1ab_0           conda-forge
  pywin32                        311                    py313h40c08fc_1        conda-forge
  pywinpty                       2.0.15                 py313h5813708_0        conda-forge
  pyyaml                         6.0.2                  py313hb4c8b1a_2        conda-forge
  pyzmq                          27.0.2                 py312hbb5da91_2        conda-forge
  qhull                          2020.2                 hc790b64_5             conda-forge
  qt6-main                       6.9.2                  h236c7cd_0             conda-forge
  referencing                    0.36.2                 pyh29332c3_0           conda-forge
  requests                       2.32.5                 pyhd8ed1ab_0           conda-forge
  rfc3339-validator              0.1.4                  pyhd8ed1ab_1           conda-forge
  rfc3986-validator              0.1.1                  pyh9f0ad1d_0           conda-forge
  rfc3987-syntax                 1.1.0                  pyhe01879c_1           conda-forge
  rpds-py                        0.27.1                 py313hfbe8231_0        conda-forge
  send2trash                     1.8.3                  pyh5737063_1           conda-forge
  setuptools                     80.9.0                 pyhff2d567_0           conda-forge
  six                            1.17.0                 pyhe01879c_1           conda-forge
  sniffio                        1.3.1                  pyhd8ed1ab_1           conda-forge
  soupsieve                      2.8                    pyhd8ed1ab_0           conda-forge
  stack_data                     0.6.3                  pyhd8ed1ab_1           conda-forge
  tbb                            2021.13.0              h18a62a1_3             conda-forge
  terminado                      0.18.1                 pyh5737063_0           conda-forge
  tinycss2                       1.4.0                  pyhd8ed1ab_0           conda-forge
  tk                             8.6.13                 h2c6b04d_2             conda-forge
  tomli                          2.2.1                  pyhe01879c_2           conda-forge
  tornado                        6.5.2                  py313h5ea7bf4_0        conda-forge
  traitlets                      5.14.3                 pyhd8ed1ab_1           conda-forge
  types-python-dateutil          2.9.0.20250822         pyhd8ed1ab_0           conda-forge
  typing-extensions              4.15.0                 h396c80c_0             conda-forge
  typing_extensions              4.15.0                 pyhcf101f3_0           conda-forge
  typing_utils                   0.1.0                  pyhd8ed1ab_1           conda-forge
  tzdata                         2025b                  h78e105d_0             conda-forge
  ucrt                           10.0.26100.0           h57928b3_0             conda-forge
  uri-template                   1.3.0                  pyhd8ed1ab_1           conda-forge
  urllib3                        2.5.0                  pyhd8ed1ab_0           conda-forge
  vc                             14.3                   h41ae7f8_31            conda-forge
  vc14_runtime                   14.44.35208            h818238b_31            conda-forge
  vcomp14                        14.44.35208            h818238b_31            conda-forge
  wcwidth                        0.2.13                 pyhd8ed1ab_1           conda-forge
  webcolors                      24.11.1                pyhd8ed1ab_0           conda-forge
  webencodings                   0.5.1                  pyhd8ed1ab_3           conda-forge
  websocket-client               1.8.0                  pyhd8ed1ab_1           conda-forge
  widgetsnbextension             4.0.14                 pyhd8ed1ab_0           conda-forge
  win_inet_pton                  1.1.0                  pyh7428d3b_8           conda-forge
  winpty                         0.4.3                  4                      conda-forge
  xorg-libxau                    1.0.12                 h0e40799_0             conda-forge
  xorg-libxdmcp                  1.1.5                  h0e40799_0             conda-forge
  yaml                           0.2.5                  h6a83c73_3             conda-forge
  zeromq                         4.3.5                  ha9f60a1_7             conda-forge
  zipp                           3.23.0                 pyhd8ed1ab_0           conda-forge
  zstandard                      0.23.0                 py313h5ea7bf4_3        conda-forge
  zstd                           1.5.7                  hbeecb71_2             conda-forge

Operating system

Windows 11

Matplotlib Version

3.10.5

Matplotlib Backend

module://matplotlib_inline.backend_inline

Python version

3.13.5

Jupyter version

7.4.5

Installation

conda

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions