pip Install and Dependencies Cheat Sheet/Install from requirements file

Install dependencies listed in a requirements file.

Section: Requirements Files

Install from requirements file

bash
bash
python -m pip install -r requirements.txt
Explanation

Common project bootstrap command for development or deployment.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Requirements Files
Install multiple requirements files
Combine base and environment-specific requirement lists.
OpenIn sheetbashsame section
Write frozen versions to requirements.txt
Generate a pinned requirements file from the active environment.
OpenIn sheetbashsame section
Install with constraints
Use a constraints file while installing dependencies.
OpenIn sheetbashsame section
Install from a direct archive URL
Install from a remote source archive or wheel URL.
OpenIn sheetbash1 tag match
Install from local path
Install a package from a local directory.
OpenIn sheetbash1 tag match
Install into a target directory
Install packages into a custom filesystem path.
OpenIn sheetbash1 tag match