Using python_requires to require Python 2.7 or 3.2+


How do I use python_requires classifier in to require Python 2.7.* or 3.2+?

I have tried many configurations, including this one: ~=2.7,==3,!=3.0,!=3.1,<4 but none have worked

Asked By: wolfy1339



This argument for setuptools uses the PEP440 version specifiers spec, so you can ask for:


The commas , are equivalent to logical and operator.

Note that the metadata generated is only respected by pip>=9.0.0 (Nov 2016).

Answered By: wim