Ask coding questions

← Back to all posts
Tkinter in python
UmerkkkKhan (6)

Hii!! I want to run Tkinter in Python on live(, but when i write
" from tkinter import * " and its come with following error :

 Traceback (most recent call last):
File "", line 3, in <module>
root = Tk()
File "/usr/local/lib/python3.6/tkinter/", line 2017, in init = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)
_tkinter.TclError: no display name and no $DISPLAY environment variable

LD1 (41)

All you have to do is when you select your language, select Tkinter instead of python.

HappyFakeboulde (222)

The error message is basically a fancy way of the interpreter saying that tkinter doesn't work on

HappyFakeboulde (222)

@UmerkkkKhan I'm not your male sibling but okay

HappyFakeboulde (222)

@Lethdev2019 because you're using the explicit tkinter repl type instead of normal python
when the developers added support for tkinter, they made it a separate type of repl, which you might have selected

PeterChaplin_Sm (0)

When making a, select TKinter rather than Python.
It is python.

Geocube101 (590)

I don't believe TKinter is supported in yet.