{"id":8257,"library":"kivy","title":"Kivy","description":"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.","status":"active","version":"2.3.1","language":"en","source_language":"en","source_url":"https://github.com/kivy/kivy","tags":["GUI","cross-platform","mobile","desktop","android","ios","embedded","multitouch","framework"],"install":[{"cmd":"pip install kivy","lang":"bash","label":"Basic Kivy installation"},{"cmd":"pip install \"kivy[full]\"","lang":"bash","label":"Kivy with common dependencies (SDL2, GStreamer, Glew)"},{"cmd":"python -m venv kivy_venv && source kivy_venv/bin/activate # On Windows: kivy_venv\\Scripts\\activate\npip install \"kivy[full]\"","lang":"bash","label":"Recommended: Install in a virtual environment with full dependencies"}],"dependencies":[{"reason":"Required for building Kivy from source; often included in wheels.","package":"Cython","optional":false},{"reason":"Core graphics and input backend (default for most platforms).","package":"kivy-deps.sdl2","optional":true},{"reason":"OpenGL backend for graphics (often default on Windows).","package":"kivy-deps.glew","optional":true},{"reason":"For audio and video playback.","package":"kivy-deps.gstreamer","optional":true},{"reason":"Alternate OpenGL backend for graphics (experimental for some platforms).","package":"kivy-deps.angle","optional":true},{"reason":"For image and text display (often included via full install).","package":"Pillow","optional":true}],"imports":[{"note":"The `App` class is the base for Kivy applications and must be imported from `kivy.app`.","wrong":"import App","symbol":"App","correct":"from kivy.app import App"},{"note":"UIX (User Interface eXtensions) module contains Kivy's widgets, including `Label`.","wrong":"from kivy.label import Label","symbol":"Label","correct":"from kivy.uix.label import Label"}],"quickstart":{"code":"import kivy\nkivy.require('2.3.1') # specify the Kivy version you're using\n\nfrom kivy.app import App\nfrom kivy.uix.label import Label\n\nclass MyApp(App):\n    def build(self):\n        return Label(text='Hello, Kivy!')\n\nif __name__ == '__main__':\n    MyApp().run()","lang":"python","description":"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."},"warnings":[{"fix":"Ensure you are using Python 3.6 or newer. For Kivy 2.3.1, Python 3.8-3.13 are supported.","message":"Kivy 2.0.0 dropped support for Python 2.7. All Kivy 2.x.x versions require Python 3.x.","severity":"breaking","affected_versions":">=2.0.0"},{"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.","message":"Kivy 2.3.0 and newer removed support for Python 3.7 and Windows 32-bit environments.","severity":"breaking","affected_versions":">=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.","message":"Several 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.","severity":"deprecated","affected_versions":">=2.3.0"},{"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.","message":"Installing 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.","severity":"gotcha","affected_versions":"all"},{"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.","message":"Kivy 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.","severity":"breaking","affected_versions":"upcoming 3.0.0"}],"env_vars":null,"last_verified":"2026-04-16T00:00:00.000Z","next_check":"2026-07-15T00:00:00.000Z","problems":[{"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.","cause":"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.","error":"ModuleNotFoundError: No module named 'kivy'"},{"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.","cause":"The necessary binary dependencies for Kivy's graphical backend (like SDL2, Glew, or GStreamer) are missing or incorrectly installed, especially on Windows.","error":"ImportError: DLL load failed: The specified module could not be found. (on Windows) or similar SDL2/OpenGL related errors."},{"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.","cause":"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.","error":"kivy.lang.BuilderException: Invalid indentation or syntax errors in .kv file."}]}