Registry / web-framework / tkinter-gl

tkinter-gl

JSON →
library1.1pypypi✓ verified 86d ago

A base class for GL rendering surfaces in tkinter, enabling OpenGL integration with Tkinter GUIs. Current version 1.1, supports Python >=3.8. Low release cadence.

pip install tkinter-gl
INSTALL
IMPORT
SIG · TKINTER-GL
T
tkinter-gl
web-frameworkpythonv1.1
Install
1.5s avg
Import
Disk
17MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 18.7MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.5s · import 0.000s · 19MB
17MB installed
● package 17MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

GLCanvas
from tkinter_gl import GLCanvas
from tkinter_gl import Canvas
Class is named GLCanvas, not Canvas.

Minimal example creating a GLCanvas inside a Tkinter window.

import tkinter as tk from tkinter_gl import GLCanvas root = tk.Tk() canvas = GLCanvas(root, width=400, height=400) canvas.pack() root.mainloop()
Debug
Known issues
gotchaGLCanvas may not work on ARM Macs without proper PyOpenGL installation. Use pip install PyOpenGL PyOpenGL_accelerate.
fix
Install PyOpenGL with compatible wheel for ARM.
affects: all
gotchaOn Linux, GLCanvas may require the Tkinter window to be realized before OpenGL calls work. Ensure you call root.update() or wait for the window to appear.
fix
Add root.update() after creating the canvas but before making GL calls.
affects: all
Errors
Common errors & fixes
ImportError: cannot import name 'GLCanvas' from 'tkinter_gl'
Installed version is older than 1.0 (if any) or package not installed.
fix
Ensure you have installed tkinter-gl (pip install tkinter-gl) and the correct import is from tkinter_gl import GLCanvas.
ModuleNotFoundError: No module named 'OpenGL'
PyOpenGL is not installed.
fix
Install PyOpenGL: pip install PyOpenGL
Upgrade
Version history
1.1latest on PyPI · released Jan 18, 2026
Audit
Dependencies
PyOpenGLrequiredRequired for OpenGL functionality.
Agent activity
4 hits · last 30 days
node
4
Resources
tkinter-gl — pip install tkinter-gl · libregistry