user interface - Starting with Tkinter for python -


the sample:

# gui.py  tkinter import * root = tk() 

results in:

$ python gui.py traceback (most recent call last):   file "gui.py", line 3, in <module>     root = tkinter.tk()   file "/usr/lib/python2.7/lib-tk/tkinter.py", line 1814, in __init__     self.tk = _tkinter.create(screenname, basename, classname, interactive, wantobjects, usetk, sync, use) _tkinter.tclerror: no display name , no $display environment variable 

i'm running python 2.7.10 under cygwin.

what doing wrong?

it seems need install x server tcl requires it.

this mailing list post mentions it:

you need install x, define display environment variable, , start x. after these steps, tkinter program should work again.


Comments