Ubuntu – Which Ubuntu for Kivy and Python3


I have Ubuntu 18.04 LTS and it is a fact of life that it does not support Kivy with Python 3.

(If you want to feel 'enlightened' try reading the following exchange: https://www.gitmemory.com/issue/kivy/kivy/5994/491939788)

QUESTION: Is there any Ubuntu version that can do the trick?

Best Answer

  • This bug, which I confirmed in Ubuntu 18.04, is probably the reason why python3-kivy was dropped from the default Ubuntu repositories in Ubuntu 19.04. This bug has been fixed and python3-kivy has been restored to the default Ubuntu repositories in Ubuntu 19.10 and later.

    A later version of Kivy 1.11.1 (instead of 1.9.1) can be installed with pip3 install kivy in a Python virtual environment using Python 3 virtual environment creator (python3-virtualenv) from the default Ubuntu repositories. Try running python3 -m pip install --upgrade pip before pip3 install kivy to upgrade your pip3 to the latest version as I did.

    Below are the results of running the Hello World test program from the link in your question with Kivy 1.11.1 in a Python 3 virtual environment. The Python 3 code ran without any errors, detected OpenGL and my NVIDIA proprietary graphics driver, and output this window:

    enter image description here

  • Related Question