To add an alternative to what’s already been suggested: you can keep a requirements.in with your explicit dependencies, and use pip-tools’s pip-compile to generate requirements.txt with the full tree, version locked. Or you can generate this from a pyproject.toml. Then you can use pip-tools’s pip-sync to install and uninstall packages to make your actual environment match the .txt lockfile.
To add an alternative to what’s already been suggested: you can keep a
requirements.in
with your explicit dependencies, and use pip-tools’spip-compile
to generaterequirements.txt
with the full tree, version locked. Or you can generate this from apyproject.toml
. Then you can use pip-tools’spip-sync
to install and uninstall packages to make your actual environment match the.txt
lockfile.