Member-only story

Python — After conda update, python kernel crashes when matplotlib is used

Windows 10 making it crash

Flutter Developer
2 min readDec 15, 2021

The following code in jupyter lab crashes the kernel :

import matplotlib.pyplot as pltplt.subplot()

env conda create -n test python=3.8.5 pandas scipy numpy matplotlib seaborn jupyterlab

Update 2021–11–06

  • The default pkgs/main channel for conda has reverted to using freetype 2.10.4 for Windows, per main / packages / freetype.
  • If you are still experiencing the issue, use conda list freetype to check the version: freetype != 2.11.0
  • If it is 2.11.0, then change the version per the solution, or conda update --all (providing your default channel isn't changed in the .condarc config file).

Solution

  • If this is occurring after installing Anaconda, updating conda or freetype since Oct 27, 2021.
  • Go to the Anaconda prompt and downgrade freetype 2.11.0 in any affected environment.
  • conda install freetype=2.10.4
  • Relevant to any package using matplotlib and any IDE
  • For example, pandas.DataFrame.plot and seaborn
  • Jupyter, Spyder, VSCode, PyCharm, command line.

Discovery

  • An issue occurs after updating with the most current updates…

--

--

Flutter Developer
Flutter Developer

Written by Flutter Developer

Flutter and Native Android developer

Responses (1)