Help Installing Python3 Tkinter

#1

Please run this install on my tkinter.glitch.me project. :pray:

sudo apt-get install python3-tk
1 Like

#2

TkInter wouldn’t work anyway as Glitch containers run in headless mode (CLI only), maning that GUIs wouldn’t work anyway.

Python 2.7.12 & Python 3.5.2 are installed in the Glitch container though. (As of writing this post)

Also, sudo access isn’t possible in the container. (I’m guessing it’s to stop people corrupting the containers)

I hope this answered your question.

1 Like

#3

Thanks. I was planning to run Tk headless and stream the generated canvas via Node. I had hoped an admin would perform the required install. :roll_eyes:

root = tk.Tk()
canvas = tk.Canvas(root, borderwidth=0)
frame = tk.Frame(canvas)
#stream the frame via Node

1 Like

#4

Ah I see, although if ran headless TkInter may throw some errors, although it should be possible to stream it to a frame.

Note: If you are using WebSockets I recommend you use wss:// if connecting to Glitch websockets as its more secure

1 Like

#5

Hey @SirFizX, sorry I missed your last reply here. I’m afraid we won’t do project-specific installs due to the overhead that would require on our small staff. Particularly since your project won’t stay in the same container across every restart - in many cases when your project starts up it’s starting in a new base container, so that install would need to be rerun.

I definitely encourage you to make a suggestion in https://support.glitch.com/c/feature-ideas for us to consider in a future container refresh, though.

1 Like