“No display name” error when launching idle in cyg

2019-05-13 06:32发布

问题:

I am getting a "Tlc error: no display name...etc" when I try to open python scripts in idle using Cygwin. I type the following:

idle python_script.py

Do I need to install another Cygwin package to make this work? Windows 7- recently installed. Thanks!!:)

回答1:

The error means that the program cannot find a display to show the window on. To solve that you need to install X Windows system and then set the display environment variable to:

export DISPLAY=:0.0

See this answer for more details: https://stackoverflow.com/a/9418800/342473