RuntimeError: main thread is not in main loop Tcl_AsyncDelete: async handler deleted by the wrong th

import matplotlib.pyplot as plt

改为:

import matplotlib

matplotlib.use(‘Agg’)

from matplotlib import pyplot as plt 即可

最后已解决,之前报错的图更新了没截。

RuntimeError: main thread is not in main loop Tcl_AsyncDelete: async handler deleted by the wrong th_第1张图片

你可能感兴趣的:(python)