import matplotlib
matplotlib.use('TkAgg')
import matplotlib.pyplot as plt
fig = plt.figure()

 

or 

 

pip install PyQt5

import matplotlib
matplotlib.use('Qt5Agg')
import matplotlib.pyplot as plt
fig = plt.figure()

 

or

 

pip uninstall matplotlib

pip install matplotlib==3.5.3

 

+ Recent posts