I use pipenv (version 2018.11.26) to manage dependencies in my project. Sometimes I want to add or update only one package and don't change versions of other packages. How can I achieve that? I've tried both
pipenv update --selective-upgrade requests
and
pipenv update --keep-outdated requests
but still versions of all the packages are updated during locking.
Pipfile & Pifile.lock: https://gist.github.com/jozo/d8351ed708e84c5ea0f69e82e585e5c6
Record dependencies in Pipfile to manage project packagesAdd a new package dependency by modifying the packages section. pipenv lock — records the new requirements to the Pipfile. lock file. pipenv update — records the new requirements to the Pipfile.
$ pipenv install is used for installing packages into the pipenv virtual environment and updating your Pipfile. The user can provide these additional parameters: --two — Performs the installation in a virtualenv using the system python2 link.
Currently, this is required for Pipenv to do sub-dependency resolution. Providing the --dev argument will put the dependency in a special [dev-packages] location in the Pipfile . These development packages only get installed if you specify the --dev argument with pipenv install .
To update installed packages to the latest version, run pip install with the --upgrade or -U option.
Running pipenv install/uninstall/update
with --keep-outdated
will prevent pipenv
from updating unrelated locked packages. (It's odd that this is not the default befavior).
If you don't want some packages to ever be updated automatically, you should pin those in your Pipfile
, e.g:
[packages] django = "==2.2" djangorestframework = "==3.9.2"
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