Registry / web-framework / kivy
library2.3.1pypypi✓ verified 85d ago

Kivy is an open-source Python framework for developing GUI applications that run cross-platform, including desktop (Windows, macOS, Linux), mobile (Android, iOS), and embedded platforms. It facilitates rapid prototyping and easy interaction design, supporting multi-touch applications with a reusable codebase. Kivy is released under the MIT License, actively developed by a strong community, and is currently at version 2.3.1.

pip install kivy
INSTALL
IMPORT
SIG · KIVY
K
kivy
web-frameworkpythonv2.3.1
Install
5.4s avg
Import
512ms
Disk
209MB
Pass rate
5/ 10
Env Coverage5 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v2.3.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.940 runs
build_error
glibc
py 3.103.940 runs
installs and imports cleanly · install 5.4s · import 0.512s · 204MB
209MB installed
● package 209MB
Code
Verified usage

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

App
from kivy.app import App
import App
The `App` class is the base for Kivy applications and must be imported from `kivy.app`.
Label
from kivy.uix.label import Label
from kivy.label import Label
UIX (User Interface eXtensions) module contains Kivy's widgets, including `Label`.

This minimal Kivy application creates a simple window displaying 'Hello, Kivy!'. It defines an `App` subclass, overrides the `build` method to return a `Label` widget, and then runs the application instance. The `kivy.require()` call is a good practice to ensure compatibility with your current Kivy version.

import kivy kivy.require('2.3.1') # specify the Kivy version you're using from kivy.app import App from kivy.uix.label import Label class MyApp(App): def build(self): return Label(text='Hello, Kivy!') if __name__ == '__main__': MyApp().run()
Debug
Known issues
breakingKivy 2.0.0 dropped support for Python 2.7. All Kivy 2.x.x versions require Python 3.x.
fix
Ensure you are using Python 3.6 or newer. For Kivy 2.3.1, Python 3.8-3.13 are supported.
affects: >=2.0.0
breakingKivy 2.3.0 and newer removed support for Python 3.7 and Windows 32-bit environments.
fix
Upgrade your Python installation to 3.8 or newer (3.8-3.13 for Kivy 2.3.1) and ensure you are using a 64-bit operating system if on Windows.
affects: >=2.3.0
deprecatedSeveral core provider properties and methods, such as `status` and `filename` in audio providers, and `toggle_fullscreen` in the window provider, were deprecated in Kivy 2.3.0.
fix
Refer to the Kivy 2.3.0 changelog for specific replacements and updated APIs. These deprecated features will be removed entirely in Kivy 3.0.0.
affects: >=2.3.0
gotchaInstalling Kivy without its binary dependencies (e.g., SDL2, GStreamer) might lead to issues with window creation, input, or multimedia playback. While `pip install kivy` works for the core library, graphical applications often require these backends.
fix
Use `pip install "kivy[full]"` to include common binary dependencies for most platforms, or install specific `kivy-deps` packages manually. Ensure you're in an activated virtual environment.
affects: all
breakingKivy 3.0.0, the next major release, is expected to remove all features deprecated in the 1.x.x and 2.x.x series. Prepare for significant API changes.
fix
Actively monitor the Kivy project's announcements and changelogs for Kivy 3.0.0 to identify and migrate away from any deprecated features in your codebase.
affects: upcoming 3.0.0
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'kivy'
Kivy is not installed in the currently active Python environment, or the Python interpreter running the script is not the one where Kivy was installed.
fix
Activate your virtual environment (if using one) and reinstall Kivy using `pip install "kivy[full]"`. Verify the Python interpreter being used by your IDE or terminal.
ImportError: DLL load failed: The specified module could not be found. (on Windows) or similar SDL2/OpenGL related errors.
The necessary binary dependencies for Kivy's graphical backend (like SDL2, Glew, or GStreamer) are missing or incorrectly installed, especially on Windows.
fix
Install Kivy with the `full` extra: `pip install "kivy[full]"`. If the problem persists, ensure your system has up-to-date graphics drivers and consider installing Visual C++ Build Tools on Windows for source compilation.
kivy.lang.BuilderException: Invalid indentation or syntax errors in .kv file.
The Kivy Language (.kv files) is sensitive to indentation (4 spaces recommended) and specific syntax rules. Improper formatting or typos can lead to this error.
fix
Carefully review your .kv file for correct indentation, proper use of `app`, `root`, and `self` keywords, and adherence to Kv language syntax. Ensure no mixed tabs and spaces.
Upgrade
Version history
2.3.1latest on PyPI · released Dec 26, 2024
Audit
Dependencies
CythonrequiredRequired for building Kivy from source; often included in wheels.
kivy-deps.sdl2optionalCore graphics and input backend (default for most platforms).
kivy-deps.glewoptionalOpenGL backend for graphics (often default on Windows).
kivy-deps.gstreameroptionalFor audio and video playback.
kivy-deps.angleoptionalAlternate OpenGL backend for graphics (experimental for some platforms).
PillowoptionalFor image and text display (often included via full install).
Agent activity
2 hits · last 30 days
node
2
Resources
kivy — pip install kivy · libregistry