When Pycharm connects to the server, it runs remotely, and the chart in the code cannot be displayed. Use PuTTY in conjunction with the Xming tool to realize the function of opening the graphical interface.
pycharm connects to the remote server and debugs the code, please refer to the series of articles:
pycharm connects to the remote server and debugs the code
Article Directory
download
Xming download address: https://en.softonic.com/download/xming/windows/post-download?
PuTTY download address: http://putty.cs.utah.edu/download.html
(PuTTY can use XShell instead of download address: https://xshell.en.softonic.com/download)
Configuration
Xming does not need to be configured, just open
PuTTY after downloading and installing :
select Session on the left menu, and enter in the Host Name on the right: remote host IP, Port: enter the port (default 22), and select SSH as the Connection type.
Select the left menu Connection->data. Enter the automatic login name in Auto-login usename. If you don’t enter it here, you will be asked to enter your username every time you log in to Linux!
Select Connection->SSH->x11 in the left menu, and check Enable X11 forwarding. (Note that if you want to use a graphical interface, this option must be checked, otherwise it can be omitted)
Select the Session on the left, and enter the name of the Session we need to save in Saved Sessions. Then press the Save button to save our settings for the Session.
At the next startup, you can select our saved Session in Saved Sessions, and then click the Load button to load the saved Session settings.
Start Xming (Xming instead of XLaunch command). Note that if you want to use the graphical interface, you must start Xming first, otherwise it can be omitted.
Start Putty and press the open button to connect to the remote server.
Enter env, there will be a lot of information, what we need is:
only this DISPLAY
Pycharm configuration
Open configuration
Configure environment variables
test
Reference:
https://www.cnblogs.com/LuckBelongsToStrugglingMan/p/13970976.html
https://blog.csdn.net/qq_35189360/article/details/96453135
https://www.cnblogs.com/xuanxufeng/p/ 6243244.html
https://www.linuxprobe.com/putty-xming-oracle.html