RuntimeError: Invalid DISPLAY variable

You must declare matplotlib.use('agg') before import pylab as plt.

Reference

Leave a Comment