I am using pipenv to handle a Python package dependencies.
The Python package is using two packages (named pckg1
and pckg2
) that relies on
You can't. At the moment, pipenv
doesn't offer anything for an explicit override of requirement constraints.
As a workaround, you can put dependencies that you want to override to dev-packages
as those will be overridden by packages
, so this Pipfile
should install pckg3>=4.1.0
:
# Pipfile
...
[packages]
pckg1 = "==3.0.0"
[dev-packages]
pckg2 = "==1.0.2"
If you now lock and install:
$ pipenv lock --dev
$ pipenv install --dev
the requirement ==4.0.11
will be overridden by >=4.1.0
. This is ugly if you ask me because this is not what development packages are meant for and you're changing the role of pckg2
dependency in project, but I don't see any better way here.