When I run pipenv install requests it will add the following to Pipfile:
requests = "*"
But I want pipenv to add the latest package to Pipfile as a fixed (hard-coded) version that is exact or compatible:
requests = "=={latest_version}"
# or
requests = "~={latest_version}"
The problem with requests = "*", is that it causes pipenv to accidentally upgrade the package to the latest version (which might cause compatibility issues) when relocking (for example when installing a new package).
With node running npm install axios will add a fixed (compatible) version:
"axios": "^0.21.1" // compatible
Currently, I have to go to the https://pypi.org/project/requests/ to determine the latest version and then run pipenv install requests=={latest_version}. Further version updates are managed by dependabot.
You may try:
pipenv install requests~=1.2
This isn't currently possible (as of writing this comment). You can upvote/check https://github.com/pypa/pipenv/issues/5531 to see the status of the issue.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With