no display name and no $display environment variable plt.show()

The Linux environment reports an error, the solution:

import matplotlib
matplotlib.use(‘Agg’)

Guess you like

Origin blog.csdn.net/BGoodHabit/article/details/129303402