It’s convenient to use pychart remote debugging program, but PLT can’t display pictures.
You can refer to pycham to remotely connect to the server and display the picture_ Cowboy does not catch a cold blog – CSDN blog
The following is the troubleshooting of errors reported by Matplotlib. Use (‘tkagg ‘) during the recent use of Matplotlib. Record it:
Use the remote server debugger. In order to display the picture, modify matplotlib.use to report an error.
Cannot load backend 'TkAgg' which requires the 'tk' interactive framework, as 'headless' is currently running
Xshell failed to open successfully. The error is eliminated after restarting xshell and xming.
But xming doesn’t pop up a window to display pictures. Restart debugging, here comes again
Then the above problem is probably not xshell and xming. Check env in the terminal and see display = localhost: 12.0
Recheck the pycharm running configuration. First clear the environment variable
Delete the display environment variable and display successfully.
After debugging and looking again, the error is reported again.
Check env again, display = localhost: 10.0
Add display = localhost: 10.0 again, the debugging is successful, try again, no problem, OK