Lauszus / rpi-kivy-wheel

Kivy wheel for Raspberry Pi

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Kivy Wheel packages for Raspberry Pi

By Kristian Lauszus, 2017


A pre-compiled binary of Kivy for the Raspberry Pi. This was compiled on a Raspberry Pi 3 running Raspbian Lite.

Instructions

First install the following dependencies:

sudo apt-get install libgstreamer1.0-dev libmtdev1

Clone the repository:

git clone https://github.com/Lauszus/rpi-kivy-wheel.git

Then simply use the commands below to install Kivy 1.11.1:

Python 2

sudo apt-get install python-wheel
sudo pip install --find-links=rpi-kivy-wheel/kivy-1.11.1 kivy==1.11.1

Python 3

sudo apt-get install python3-wheel
sudo pip3 install --find-links=rpi-kivy-wheel/kivy-1.11.1 kivy==1.11.1

Developers

The packages can be generated using the following steps on a fresh install of Raspbian Lite.

Set the Python version you want to use:

export PYTHON=python3
export PIP=pip3

Install dependencies:

sudo apt-get install $PYTHON-pip $PYTHON-dev
sudo apt-get install pkg-config libgl1-mesa-dev libgles2-mesa-dev libgstreamer1.0-dev gstreamer1.0-plugins-{bad,base,good,ugly} gstreamer1.0-{omx,alsa}
sudo apt-get install libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-ttf-dev

Download the latest version of Kivy:

wget `curl -s https://api.github.com/repos/kivy/kivy/releases/latest | python -mjson.tool | grep 'zipball_url' | cut -d'"' -f4` -O kivy.zip

Setup virtual environment:

sudo $PIP install -U pip virtualenv setuptools
virtualenv --no-site-packages -p $PYTHON rpi-kivy-venv
source rpi-kivy-venv/bin/activate

Install Python packages:

pip install pygments docutils cython==0.29.9

In this case I install Cython 0.29.9, as needed by Kivy 1.11.1: https://kivy.org/doc/stable/installation/installation-linux-venvs.html?highlight=cython.

Now compile the wheel:

KIVY_SPLIT_EXAMPLES=1 pip -v wheel --wheel-dir=rpi-kivy-wheel kivy.zip

Now make sure that the wheel is working:

pip install --find-links=rpi-kivy-wheel kivy
python -c 'import kivy'

For more information send me an email at lauszus@gmail.com.

About

Kivy wheel for Raspberry Pi

License:MIT License