This error is because the remote server does not have a graphical interface. So we need to add to the code:
import matplotlib.pyplot as plt plt.switch_backend('agg')i.e., use a Backend that doesn't require a GUI, so that's fine
This error is because the remote server does not have a graphical interface. So we need to add to the code:
import matplotlib.pyplot as plt plt.switch_backend('agg')i.e., use a Backend that doesn't require a GUI, so that's fine