pip-tools has more functionality than this, but compile alone is quite useful.
Start with a loose list of dependencies in
requirements.in file can have things like
>= and such if you have some restrictions on your dependencies.
pip install pip-tools
Then, in create a
requirements.txt file with
python -m piptools compile requirements.in
The output will be shown on stdout, but also in
# autogenerated by: pip-compile requirements.in click==7.1.2 # via typer colorama==0.4.4 # via rich commonmark==0.9.1 # via rich pygments==2.9.0 # via rich rich==10.2.2 # via -r requirements.in typer==0.3.2 # via -r requirements.in
Now, do the same with a
dev-requirements.ini to create
Then, of course:
pip install -r requirements.txt
pip install -r dev-requirements.txt
- And test your application.
- All good? Push changes.
pip-compile to update all packages in an existing