PyPI wheel package installation script
SpotlightKid last edited by
Here's a script I wrote (using pypista as the starting point) that looks up a package on PyPI, tries to download a fitting wheel package and installs it:
To use, simply run it and enter a package name at the prompt or pass the package name as an argument (tap and hold run button).
Currently only a about a quarter of the most popular packages on PyPI provide wheel format packages. Hopefully this number will increase soon.
The script installs the wheel by simply unzipping it into the
site-packagesdirectory. If the
wheelpackage is installed, it will use the facilities provides by the
wheel.installmodule, but unfortunately this doesn't work in Pythonista, since
distutilscomplains about the
Makefilemissing from the Python installation.
The script only checks if the wheel fits the Python version number of the Python interpreter it is run from (i.e. Pythonista == 2.7), so it may install wheels containing C extensions compiled for other operating systems. If a package installed with this script doesn't work with Pythonista, just delete the package directory and the corresponding
site-packagesand restart Pythonista.