[Django]-Docker/matplotlib: RuntimeError: Invalid DISPLAY variable

2👍

The reason is that I import seaborn before I import matplotlib. This caused matplotlib not running in the right place.

2👍

From here: RuntimeError: Invalid DISPLAY variable

import matplotlib.pyplot as plt
plt.switch_backend('agg')

I used this on a remote machine, with ssh & screen, no X forwarding.

👤Mircea

Leave a comment