Posted on :: 51 Words

Force matplotlib to not use DISPLAY & Save figure instead:
[Download the sample file here (I won’t make it easy for you)

plot_learning_curve.py_.png

 import matplotlib
matplotlib.use(‘Agg’)
..
plt.savefig(“plt.png”)
plt.close()