Hi guys I want to create a basic GUI with TKinter.
This is my code
from tkinter import*
import tkinter.font
win =Tk()
win.title("Test")
myFont = tkinter.font.Font( family = 'Helvetica', size = 12, weight = 'bold')
def ledToggle():
print("Hello World")
button1 = Button(win,text ='Test', font = myFont,command = ledToggle, bg='bisque2$
button1.grid(row=0,column=1)
I get this error message:
Traceback (most recent call last):
File "gui.py", line 4, in <module>
win =Tk()
File "/usr/lib/python3.5/tkinter/__init__.py", line 1880, in __init__
self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)
_tkinter.TclError: no display name and no $DISPLAY environment variable
startx
manually, is your desktop environment broken or incomplete? And what kind of display we are talking about? HDMI?