Ask coding questions

← Back to all posts
sienaciz (4)

Hello! I have a code for a Tetris game that I made at a summer program, but I need to import graphics (from graphics import ) so I can use it on my own computer. I've tried uploading the file into as well as in another folder, and I've tried using the requirements.txt thing too. I keep getting errors that say either 3 things: "no module named graphics," "could not find a version that satisfies the requirement graphics (from versions: )," or "File "", line 7, in <module>
from graphics import

File "/home/runner/", line 174, in <module>
_root = tk.Tk()
File "/usr/local/lib/python2.7/lib-tk/", line 1819, in init = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)
_tkinter.TclError: no display name and no $DISPLAY environment variable."

I'm using the simple object oriented graphics library version 5.0 by John Zelle, if that helps.

Please help!! I really want to run my code!

mat1 (4424)

Please upvote this comment if it was helpful or useful in any way currently doesn't have GUI support. However, you could use Python Turtle to display stuff

ash15khng (712)

Hi, currently does not have GUI support yet, so trying to use any GUI libraries will not work.