Last modified: Mar 25, 2025 By Alexander Williams

How to Install Kivy in Python Step by Step

Kivy is a popular Python library for building cross-platform apps. It supports Windows, macOS, Linux, Android, and iOS. This guide will help you install Kivy easily.

Prerequisites

Before installing Kivy, ensure you have Python installed. You can check this by running python --version in your terminal.

 
python --version


Python 3.9.0

If Python is not installed, download it from the official website. Python 3.7 or higher is recommended for Kivy.

Install Kivy Using pip

The easiest way to install Kivy is using pip, Python's package manager. Open your terminal and run the following command.

 
pip install kivy

This will download and install Kivy along with its dependencies. Wait for the installation to complete.

Verify the Installation

After installation, verify Kivy is installed correctly. Run the following Python code in your terminal.

 
import kivy
print(kivy.__version__)


2.1.0

If you see the version number, Kivy is installed successfully. If you encounter ModuleNotFoundError, check our guide on how to solve ModuleNotFoundError.

Install Kivy with Dependencies

For advanced features, install Kivy with additional dependencies. Use the following command.

 
pip install kivy[base,media,full]

This installs Kivy with audio, video, and other extras. It is useful for multimedia apps.

Create a Simple Kivy App

Test your Kivy installation by creating a simple app. Save the following code in a file named main.py.

 
from kivy.app import App
from kivy.uix.label import Label

class MyApp(App):
    def build(self):
        return Label(text='Hello, Kivy!')

MyApp().run()

Run the app using the command below.

 
python main.py

A window with the text "Hello, Kivy!" should appear. This confirms Kivy is working.

Troubleshooting

If Kivy fails to install, ensure your pip is up to date. Run pip install --upgrade pip and try again.

For issues on Windows, install the Microsoft Visual C++ Build Tools. Kivy requires these for compilation.

Conclusion

Installing Kivy in Python is simple with pip. Follow these steps to start building cross-platform apps. For more help, check Kivy's official documentation.