DP_GP_cluster icon indicating copy to clipboard operation
DP_GP_cluster copied to clipboard

"no display name..." error when plotting (in Windows Susystem for Linux)

Open sarahhp opened this issue 5 years ago • 0 comments

When running the test with the --plot option I recieved an error: "_tkinter.TclError: no display name and no $DISPLAY environment variable". I am using the ubuntu application in Windows Subsystem for Linux (WSL) which by deafult has no graphical interface. I'm not familiar with configuring graphical setups for non-graphical environments like WSL or ssh but a quick google found that adding "matplotlib.use('Agg')" to a script should fix the general issue. See https://stackoverflow.com/questions/37604289/tkinter-tclerror-no-display-name-and-no-display-environment-variable.

So after finding the DG_GP_cluster.py file with "which DG_GP_cluster.py" all I had to do was uncomment the lines

import matplotlib matplotlib.use('Agg')

and the test data ran smoothly, producing the necessary pngs. I thought this might be helpful for other users :).

sarahhp avatar Dec 19 '19 09:12 sarahhp