I've written some FAQs to go on piwheels master alongside the index file:
How do I install packages from piwheels?
Raspbian Stretch:
Simply add the following to /etc/pip.conf
:
[global]
extra-index-url=https://www.piwheels.hostedpi.com/simple
Raspbian Jessie:
Upgrade pip to 9.0.1 using sudo pip3 install pip –upgrade
and follow the Raspbian Stretch instructions.
Other operating systems:
Install pip 9.0.1, and follow the Raspbian Stretch instructions.
How do I install a package from piwheels within a virtual environment?
If you had to upgrade pip to 9.0.1 you may also need to upgrade pip within the virtual environment with pip install pip –upgrade
. If not (e.g. in Raspbian Stretch), pip should honour your /etc/pip.config file and use piwheels as configured.
How do I install a package from piwheels without changing my pip configuration?
To explicitly use piwheels, simply use the -i
or –index-url
option, for example:
sudo pip3 install numpy -i https://www.piwheels.hostedpi.com/simple
or
sudo pip3 install numpy –index-url https://www.piwheels.hostedpi.com/simple
Alternatively, you can use piwheels as an additional index, which will allow pip to fall back to PyPI if the requested package (or one of its dependencies) is not available on piwheels, by using the –extra-index-url
option, for example:
sudo pip3 install numpy -extra-index-url https://www.piwheels.hostedpi.com/simple
How do I install a package from PyPI (not from piwheels)?
If your pip is configured to use piwheels, but you want to use PyPI instead, you can either remove the extra-index-url
configuration in /etc/pip.conf
to avoid piwheels permanently, or you can explicitly request PyPI in the installation command, for example:
sudo pip3 install numpy -i https://pypi.python.org/simple
How much time does piwheels save?
Time saved depends on the package requested, and the Raspberry Pi model used. Some packages usually require significant build time, which is avoided by using piwheels. Many packages are usually quite quick to install anyway, and only a small amount of time is saved.
I maintain a package on PyPI. How do I publish it on piwheels?
You don’t need to do anything. All package releases on PyPI are automatically processed by the piwheels project.
Why is a package I maintain is not available on piwheels?
Some packages fail to build, for various reasons. If you would like to investigate, try building the package yourself on a Raspberry Pi 3 with a Raspbian Lite image by running pip3 wheel <package>
. If you find you are able to successfully build the package (for example, by installing some build dependencies), please open an issue on github and we’ll try to resolve it.
Why are some versions of a package available on piwheels and other versions are not?
piwheels attempts to build every release of every package on PyPI. Some build attempts are unsuccessful, and these versions will not be available on piwheels. While some versions of a given package may be available, others may not have been built successfully. If you maintain the package or otherwise have a solution for the build, please open an issue on github and we’ll try to resolve it.
How long does it take for a new release to become available on piwheels?
???
Does piwheels use cross-compilation?
No. All wheels are built natively on the Raspbian operating system on Raspberry Pi 3 hardware.
Which Raspberry Pi models are supported by packages provided by piwheels?
All curent Raspberry Pi models (as of September 2017) are supported:
- Raspberry Pi 3
- Raspberry Pi 2
- Raspberry Pi 1
- Raspberry Pi Zero
Please also observe answers to questions relating to operating systems and Python versions.
I installed a package from piwheels and it doesn’t work as expected
Some packages build differently depending on the tools available. For example, if the package matplotlib
is built with pyqt
installed, the wheel will depend on the user also having pyqt
installed. If it is built without pyqt
, the user can use matplotlib
without pyqt
.
If you find an issue with a package installed from piwheels, please submit an issue on github.
Which Python versions does piwheels support?
Currently, piwheels supports Python 3 only. While most packages available will work in any version of Python 3, but some packages are only compatible with the minor version with which they were built.
Currently supported:
Planned support:
- Python 3.5
- Python 3.6
- Python 2.7
Where can I find the piwheels source code?
The source code for the piwheels project can be found on GitHub at github.com/bennuttall/piwheels.
What infrastructure does the piwheels project use?
The piwheels project is hosted on a cluster of Raspberry Pi 3s provided by Mythic Beasts.
The original build run was completed by a total of 20 Raspberry Pis, and now a smaller cluster (fewer than 5 Pis) remains active, continuing to build new package releases.
The package I installed took a long time to install, despite being available on piwheels.
First of all: check your pip configuration and confirm that piwheels is in fact being used. You should see downloading from https://www.piwheels.hostedpi.com
.
If you are definitely using piwheels, it could be that while the package you installed was available on piwheels, perhaps one of its dependencies is not available, and requires downloading from PyPI and building from source.
Why are the wheel files are tagged with ARMv6 and ARMv7? What about ARMv8?
While the hardware in Raspberry Pi 1 and Zero is ARMv6, Pi 2 is ARMv7, Pi 3 is ARMv8, the Raspbian operating system images provided on raspberrypi.org are made to support all three architectures (and are compatible with all Raspberry Pi products to date) by operating in ARMv6 userland.
However, wheels built on a Raspberry Pi 2 or 3 are tagged armv7l
. Since wheels built on a Raspberry Pi 3 will work on a Pi 2, 1 or Zero, we simply provide Pi 3-built wheels renamed armv6l
.
Will wheels provided on piwheels work on other ARM platforms?
Some wheels may work on other ARM platforms, but we can’t guarantee this. Pure Python wheels will certainly work, but there’s a much smaller speed increase installing from wheels over source distribution. ARM platform wheels on piwheels are tagged armv6l
and armv7l
but actually both contain ARMv6-compatible code, which may not work on true ARMv7 platforms.
Does piwheels work for the Raspberry Pi Desktop operating system for x86?
See the following answer.
Can I install packages from piwheels on my PC/Mac to speed up installations?
Pure Python wheels will certainly work, but there’s a much smaller speed increase installing from wheels over source distribution. Packages requiring compilation are built for a specific architecture, so they will not be useful on non-ARM platforms and will be ignored. Assuming your pip configuration is set to fall back to PyPI, installation will continue from there, which may involve building from source.
Are you going to upload all the wheels to PyPI?
No - we can’t. Only package maintainers can upload files to PyPI.
I’m a package maintainer. Can I upload an ARM wheel to PyPI?
The current PyPI website does not allow ARM wheels to be uploaded. The next-generation PyPI project (pypi.org) does allow uploading ARMv6 and ARMv7 wheels (by setting repository=https://upload.pypi.io/legacy/
for PyPI in your ~/.pypirc
file) but it should be noted that wheels built on a Raspberry Pi 3, although tagged armv7l
are not truly ARMv7, and may be incompatible with other ARM platforms. If your package is made exclusively for the Raspberry Pi platform, there is no harm in uploading ARM wheels to PyPI, and this will speed up the installation for users who do not have pip configured to use piwheels.
If you intend for your package to be installed by users in multiple ARM platforms, you may be best not to upload ARM wheels to PyPI and instead leave Raspberry Pi users to get a wheel from piwheels, and leave other ARM platform users to build from source.
@waveform80 can you double-check over the answers, add any you think are missing, and create another html file (static is fine, we can push updates easy enough)?