在linux服务器端执行python脚本,画图,linux没有GUI界面,因此需要在导入matplotlib.pyplot库之前先执行
import matplotlib as mpl
mpl.use('Agg')
再执行
Import matplotlib.pyplot as plt
在linux服务器端执行python脚本,画图,linux没有GUI界面,因此需要在导入matplotlib.pyplot库之前先执行
import matplotlib as mpl
mpl.use('Agg')
再执行
Import matplotlib.pyplot as plt