Pip install linux extras with auto wheel selection

I need to install wxPython on Debian 9 (Stretch) and Debian 10 (Buster) systems, via a pip requirements file.

At the moment the install is manual for each target os, but I was wondering if the pip environment markers could be used to determine the appropriate dependency. Described in PIP 508

platform_version seems to be the closes possibility. It would work fine for different OS (e.g. Linux v Windows v Mac), but doesn’t seem to have enough fine grain control to detect different versions of the same OS (e.g. Debian 9 v Debian 10, or even Ubuntu XX, etc).

Anyone know of way of achieving this (other than a bash script or python script?).

Anyway of using the extra marker perhaps ?


I installed wxPython on Debian 9 and 10, following the recipe :



Thanks Zylyco.

I don’t think I will go down this rabbit hole. This is way too much overkill (to build everything from sources) when there are packages already pre-built and all I need is a way to select which one to install.

It sounds like a simple BASH/CMD shell wrapper to call pip is the easier solution.

Cheers :smiley: