I have this error '_tkinter.TclError: no display name and no $DISPLAY environment variable' when my backend in vi /usr/local/lib/python2.7/dist-packages/matplotlib/mpl-data/matplotlibrc
backend: TkAgg
I have met the same problem as mayyphyokhaing did, and I also changed the backend from TkAgg to Agg. While the problem still exits. I'm testing the demo.py on Linux Ubuntu 16.04 Server version. So, there is no display at all.
I changed the code to save the figure in the folder as following , but still got the above problem.
add these 3 lines
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
Will this related to the GPU? The GPU I'm using is Nvidia Tesla V100.
I have this error '_tkinter.TclError: no display name and no $DISPLAY environment variable' when my backend in vi /usr/local/lib/python2.7/dist-packages/matplotlib/mpl-data/matplotlibrc backend: TkAgg
I have met the same problem as mayyphyokhaing did, and I also changed the backend from TkAgg to Agg. While the problem still exits. I'm testing the demo.py on Linux Ubuntu 16.04 Server version. So, there is no display at all.
I changed the code to save the figure in the folder as following , but still got the above problem.
add these 3 lines
import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt
Will this related to the GPU? The GPU I'm using is Nvidia Tesla V100.
Could anyone give me some help~