Reputation: 5728
Is there a way in pipenv to specify the minimum version of python in the Pipfile?
Would something like this work?
[requires]
python_version = ">=python 3.5"
Upvotes: 56
Views: 27031
Reputation: 28222
No, pipenv
does not support a minimum python version. Per pipenv issue 1050 feature request on Sep 5, 2018, the pipenv
authors have explicitly chosen not to implement it:
This is not planned as a feature, not a bug, etc. it is a conscious choice to not pursue it, not simply ‘because it is hard’, but because we chose not to pursue it... we have thought about the implications of this decision. We have no plans to change it.
Note that you can specify:
python_version = "3"
to allow any version of Python 3. Not exactly what you asked for, but it might be sufficient for some projects.
Upvotes: 52
Reputation: 4957
As other answers explain, this is not supported in Pipenv and is never going to be supported by decision of the maintainers.
Instead, you can use Poetry, which does not have such an attitude and does not have any problem with specifying an arbitrary version range for supported Python versions.
Upvotes: 4