What is pip-compile?
28 January 2024 (Updated 28 January 2024)
On this page
In a nutshell
pip-compile
is a command-line utility (included as part of the pip-tools
package) that takes a plain-text requirements.in
file and output a requirements.txt
file that contains all the direct and indirect dependencies of your project, including their specific versions.
Workflow: Add a new dependency
Open your requirements.in
file and manually add an entry:
uvicorn >= 0.27.0
Run the below to generate a new requirements.txt
:
pip-compile requirements.in
Run the below to install the dependencies:
pip install -r requirements.txt
Tagged:
Python
Thanks for your comment 🙏. Once it's approved, it will appear here.
Leave a comment