Menu

Python Wheels for the Raspberry Pi

piwheels is a Python package repository providing Arm platform wheels (pre-compiled binary Python packages) specifically for the Raspberry Pi, making pip installations much faster. Packages are natively compiled on Raspberry Pi 3 hardware using the Mythic Beasts Pi cloud.

Packages175,011
Wheels1,412,766
Downloads (all time)13,183,778
Downloads (last 30 days)966,539

Configuration

Raspbian includes configuration for pip to use piwheels by default. If you're using an alternative distribution (or an older version of Raspbian), you can use piwheels by placing the following lines in /etc/pip.conf:

[global]
extra-index-url=https://www.piwheels.org/simple

That's it! With this simple configuration change, pip should now search piwheels for built distributions of packages and use them in preference to building from source. You can test this out by creating a virtual environment and attempting to install scipy which usually involves a fairly lengthy compilation:

$ sudo apt install virtualenv python3-virtualenv -y
$ virtualenv -p /usr/bin/python3 testpip
$ source testpip/bin/activate
(testpip) $ pip install scipy
...
(testpip) $ deactivate
$ rm -rf testpip/

Support

Wheels provided support all Raspberry Pi models (Pi 4, Pi 3, Pi 2, Pi 1 and Pi Zero). Wheels are provided for Raspbian Jessie (Python 3.4), Raspbian Stretch (Python 3.5) and Raspbian Buster (Python 3.7). See each package's project page for information on available wheels.

Page last updated 2019-11-14 23:58