Python GUI Kivy Tutorial – part 1 – install Kivy library and demo running

Kivy Logo

In order to create python application with user interface it is needed to use right libraries (packages). 

One of them is Kivy. Huge advantage of this package is that it is cross-platform. So programs written with it can be run on different operating systems.

Kivy is able to be used on:

  • Windows
  • Linux
  • Android
  • IOS
  • OS X
  • RaspberryPi

Kivy first run

To write your first program you have to install Kivy. In Python 3 and above versions you can use PIP for it. PIP stands for – Python Install Packages.

  1. First assure that you have the newest version of PIP. Run this command inside your CMD (comand line) or Powershell:
python -m pip install --upgrade pip wheel setuptools

2. Install dependencies:

python -m pip install docutils pygments pypiwin32 kivy.deps.sdl2
python -m pip install kivy.deps.gstreamer

Caution!: In you have Python 3.5 you have also to run it afterwards:

python -m pip install kivy.deps.angle

3. Now install Kivy

python -m pip install kivy

4. [Optionally] You can install  examples of projects with Kivy library if you want to run demo.

python -m pip install kivy_examples

Run demonstration application

If you downloaded Kivy examples, you can run demo app. Inside command line go to path where you have your Python interpreter and typt this command:

python share\kivy-examples\demo\showcase\main.py

Now you can see following application which demonstrates Kivy possibilities.

Kivy demo App

In the next part we will learn how to code using this library.

Leave a Reply

Your email address will not be published. Required fields are marked *