Home > python > getting started with Kivy

getting started with Kivy

Kivy is an open source library for developing multi-touch applications. It is cross-platform (Linux/OSX/Windows/Android/iOS) and released under the terms of the MIT License.

It comes with native support for many multi-touch input devices, a growing library of multi-touch aware widgets and hardware accelerated OpenGL drawing. Kivy is designed to let you focus on building custom and highly interactive applications as quickly and easily as possible.” (source)

How to install it in a virtual environment? I could install it but when I wanted to create a basic app, it dropped some error messages (“pygame or sdl missing”).

Instead of Pygame I chose the SDL way. So under Manjaro I had to install globally the following packages:

sudo pacman -S gstreamer sdl2_ttf sdl2_mixer sdl2_image

Maybe gstreamer is not necessary, I’m not sure.

I suggest working with Kivy in a Python 2 virtual environment. Why? If you want to build your app for Android, then you can use the buildozer tool. However, at the moment it doesn’t support Python 3 :( I’m sure it’ll change but at the moment stick with Python 2.

Then, in your virtual environment, install these:

pip install cython
pip install kivy

Let’s try if it works. Activate your virt. env. and launch the Python interpreter in it. Then try this code:

>>> from kivy.app import App
>>> App().run()

If you get a blank window with black background, then everything is fine.


  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: