matplotlib报错no display name and no $DISPLAY environment variable解决方案

matplotlib报错no display name and no $DISPLAY environment variable解决方案

# import this before everything
import matplotlib
matplotlib.use('Agg')

from matplotlib import pyplot as plt

plt.figure() # now is ok

猜你喜欢

转载自blog.csdn.net/songbinxu/article/details/82689301