Ubuntu – How to install kivy

software installation

I was trying to install Kivy (by following the instructions here). I downloaded and installed all packages where the installation process went through without giving me any errors.

However, when later I enter below command;

sudo easy_install kivy

It looked like it was going to work but it ends with an error by displaying following lines, which I don't comprehend:

Detected compiler is unix
/tmp/easy_install-BtOA_u/Kivy-1.8.0/kivy/graphics/texture.c:8:22: fatal error: pyconfig.h: No such file or directory
#include "pyconfig.h"
                  ^
compilation terminated.
error: Setup script exited with error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

I saw a similar question asked as;
Problem with kivy installation. However, this didn't work for me though the question suggests installing libgles-mesa-dev-lts-raring which I did as below;

sudo apt-get install libgles-mesa-dev-lts-raring 

which then gave below;

E: Unable to locate package libgles-mesa-dev-lts-raring 

(sorry for being so specific and perhaps obvious, but I'm in the early stage of learning my way around linux).

This user was running Ubuntu 12.04, and most other questions related to this I've seen came from people with a different release from mine, which has led me to believe that that is the reason why the suggestions to those didn't solve my problem.

I'm using Ubuntu 13.10

Best Answer

Try the below commands on the terminal to install kivy on Ubuntu 13.10 and 14.04,

sudo add-apt-repository ppa:kivy-team/kivy
sudo apt-get update
sudo apt-get install python-kivy