Wrote a program to run on the remote server, because calling Matplotlib to draw a picture always reports an error_ Tkinter.tclerror: no display name and no $display environment variable. After a variety of data searches, we know that because the server does not have a graphical interface, some blogs recommend adding import Matplotlib matplotlib.use (‘ag ‘) at the front of the code or changing the matplotlibrc file to find the backend here, and then change it to Ag, such as backend: Ag! There are some other ways to use the tool of connecting to the server to use the graphical interface, such as putty + XMIND or xshell plus XMIND. However, the server will report errors without a graphical interface. You can add PLT. Savefig (“1. PNG”) after PLT. Show() to save the image to the server, and then take it to have a look
Similar Posts:
- Warning: untrusted X11 forwarding setup failed: xauth key data not generated
- RuntimeError: Python is not installed as a framework [How to Solve]
- [Solved] Runtime Warning: Font Glyph 20108 is missing. Font.set Fu text (s,0.0,flags=flags), RuntimeWarningGlyph20108missingfromcurrentfontfontsettexts00flagsflags
- [Solved] UserWarning: Matplotlib is currently using agg, which is a non-GUI backend, so cannot show the fi…
- Can’t connect to X11 window server using ‘:1.0’ as
- Solve the problem of attributeerror: module ‘Matplotlib’ has no attribute ‘verb
- Matplotlib.pyplot Plug-in Chinses Font Error: RuntimeWarning: Glyph 26376 missing from current font
- SSH connection to the server two small problems, bad file number and SSH Chinese garbled
- On the program error and level ini_ set(“display_ errors”,”On”)
- [Solved] ini_set(“display_errors”,”On”); & error_reporting(E_ALL);