27
votes

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"
1
it seems they just support hard version pins for Python. There is an issue on Githublmiguelvargasf
Thanks @lmiguelvargasf. I appreciate the prompt response. I hope that they will implement support for this feature down the road.Jasonca1
I agree with you. It would be awesome if they provide this feature.lmiguelvargasf
To follow up on this, the devs have explicitly said that they will not be adding this feature - even though it puzzles quite a lot of users. The issue.Bram Vanroy
I agree @BramVanroy, I think this feature would be very handy. Hopefully the devs, given enough pressure from the community, change their mind on this and implement it. I would love to see pipenv ship with future versions of python and become the defacto standard for managing virtualenvs in the python language.Jasonca1

1 Answers

14
votes

No, pipenv does not support this. Per pipenv issue 1050 feature request, the pipenv authors have explicitly chosen not to implement 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.