Installing Kivy and Buildozer and building Android apps with Python 3.7 on Fedora 29

Kivy is a great UI framework for Python. You can use it to write cross-platform rich UI/UX applications for almost all platforms.

Kivy’s documentation is great, but there are no instructions for newer Fedora releases so it can be tricky to install it with Wayland, Python 3.7, dependencies etc.

So here is how to do it, it’s very simple:

We will need to compile stuff so install development tools:

sudo dnf groupinstall "Development Tools"

Now let’s install all the Kivy dependencies:

sudo dnf install gcc SDL2-devel zlibrary-devel mesa-libGL-devel "SDL2_*devel" ffmpeg gstreamer1-devel ccache ncurses-devel ncurses-devel.i686 libstdc++-devel.i686 gtk2-devel.i686 gtk2-devel pangox-compat-devel pangox-compat-devel.i686 idn2 unzip zlib-devel.i686 patch autoconf automake libtool ncurses-compat-libs ncurses-compat-libs.i686

Some of this may be unnecessary but it worked for me on several installations.

Let’s install Kivy now:

python3 -m venv venv # make a venv for kivy

pip install --upgrade pip # upgrade pip
pip install cython pillow
pip install git+
pip install git+

This installs Kivy and buildozer build tool from their respective master branches.

Here is a simple Kivy app (thanks to this article) to verify it is working:

import kivy.uix.boxlayout
import kivy.uix.textinput
import kivy.uix.label
import kivy.uix.button

class SimpleApp(
    def build(self):
        self.textInput = kivy.uix.textinput.TextInput()
        self.label = kivy.uix.label.Label(text="Your Message.")
        self.button = kivy.uix.button.Button(text="Click Me.")
        self.boxLayout = kivy.uix.boxlayout.BoxLayout(orientation="vertical")
        return self.boxLayout

    def displayMessage(self, btn):
        self.label.text = self.textInput.text

if __name__ == "__main__":
    simpleApp = SimpleApp()

Save this as and run it with python

Works? Great! And now, let’s build for Android.

Initialize the project from the directory containing with buildozer init. And build! buildozer -v android debug

Notice the -v. It is needed the first time as you need to agree with Android SDK and NDK license terms.

That’s it!

You can check my Android game built with Kivy here:

Have fun!


Now read this

Presenting at Tarabica 2016 Belgrade - Conference report

This year I was very surprised and grateful to be invited to speak for the first time at one of the biggest IT conferences in Serbia - Tarabica # Conference. It was held at the Singidunum University in Belgrade on May 7th. I met some... Continue →