PyOpenGL
Standard OpenGL bindings for Python
What it is and what it does
PyOpenGL is a mature Python wrapper around the OpenGL graphics API and related libraries (GLU, GLUT, GLX, GLE, Mesa). It uses ctypes to provide direct bindings without requiring compiled C extensions, making it portable across platforms. The package exposes the OpenGL API surface, allowing developers to write 3D graphics applications directly in Python.
The library is designed for developers building graphics applications, visualizations, or games. It works by dynamically loading OpenGL libraries at runtime, so it depends on the host system having OpenGL drivers and libraries installed. An optional companion package, PyOpenGL_accelerate, provides compiled extensions for performance-sensitive code paths, though the base package functions without it.
Use it for:
- Building 3D graphics applications and games using OpenGL directly from Python.
- Creating scientific visualizations that require real-time 3D rendering.
- Prototyping graphics algorithms and shaders without leaving Python.
- Educational projects to learn OpenGL concepts with Python's accessibility.
- Integrating OpenGL rendering into larger Python applications via windowing toolkits.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
PyOpenGL provides standard OpenGL bindings for Python, enabling direct access to OpenGL graphics libraries through ctypes without requiring compiled extensions.
Yes, if you need direct OpenGL access from Python. PyOpenGL is the standard choice for this use case, actively maintained, permissively licensed, and has no runtime dependencies. Install it only if your project requires low-level graphics control; higher-level libraries may be simpler for many applications. Requires a working OpenGL environment on the target system.
Install
pyopengl on PyPI
pip
pip install pyopengluv
uv add pyopenglpoetry
poetry add pyopenglInstalling PyOpenGL
Before you install
Installation is straightforward via pip with no runtime dependencies. The package is actively maintained with a recent commit on 2026-07-15 and has been stable since its initial release in 2006.
License in practice
Licensed under a permissive BSD license, allowing use in both open-source and proprietary projects without significant restrictions.
Quickstart
pip install PyOpenGL
import PyOpenGL
# Then use OpenGL bindings for graphics operations
Requires OpenGL libraries and a graphics context on the host system; headless environments will not work.
Verify before relying
- Whether PyOpenGL_accelerate (optional compiled extension) is necessary for performance-critical applications.
- Current Python version support boundaries (classifiers list Python 2 and 3 but requires_python is unspecified).
- Whether all OpenGL extensions (EXT, ARB) are fully supported in version 3.1.10.
- Specific module structure and import patterns for typical usage.
Package facts
| License | not declared (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 361 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 4,991,920/month — #2,184 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pyopengl-3.1.10-py3-none-any.whl
Keywords: Graphics, 3D, OpenGL, GLU, GLUT, GLE, GLX, EXT, ARB, Mesa, ctypes
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
glfwPython bindings for GLFW 3 that wrap the C…
permissive · top 5,000 on PyPI
PyOpenGL-accelerateProvides Cython-compiled C extensions that…
permissive · top 5,000 on PyPI
modernglModernGL is a Python wrapper over OpenGL Core…
permissive · top 15,000 on PyPI
moderngl-windowmoderngl-window simplifies OpenGL window…
permissive · top 15,000 on PyPI
pyglmPyGLM provides Python bindings to OpenGL…
permissive · top 15,000 on PyPI
vispyVisPy is a GPU-accelerated 2D/3D visualization…
permissive · top 5,000 on PyPI
glcontextProvides portable OpenGL context creation…
permissive · top 15,000 on PyPI
PyGEL3DPyGEL3D provides Python bindings for a C++…
permissive · top 15,000 on PyPI
Panda3DPanda3D is a 3D game engine with Python…
permissive · top 15,000 on PyPI
pygletpyglet is a cross-platform windowing and…
unclear · top 5,000 on PyPI