【python报错】:ImportError: Cannot load backend ‘TkAgg‘ which requires the ‘tk‘ interactive framework

import numpy as np
import matplotlib.pyplot as plt
import matplotlib as mpl
#import matplotlib; matplotlib.use('TkAgg')

解决方法:直接注释掉最后一行就可以了。

你可能感兴趣的:(python)