Search code examples
pythonmatplotlibcondaspyderfreetype

spyder's kernel dies when I try to make a plot


I just updated spyder to 5.1.5 and all it takes is these 4 lines of code to break the kernel:

import numpy as np
import matplotlib.pyplot as plt
arr = np.arange(0,100)
plt.plot(arr)

Other plots also fail. Inline plotting also fails. Help!

I made a new environment using anaconda:

conda create -n ws_fcst python=3.8 spyder pandas numpy matplotlib scikit-learn sqlalchemy pyodbc

Still the same problem.


Solution

  • This is likely a duplicate of my problem.

    Spyder 5.1.5 creates a new kernel after running a custom function

    There is a potential solution in my answers. Otherwise, you can also downgrade freetype from 2.11.0 to 2.10.4 by doing conda install freetype=2.10.4 as suggested by Eheran1 in this GitHub post.

    https://github.com/spyder-ide/spyder/issues/16659