pip Install and Dependencies Cheat Sheet/Install into a target directory

Install packages into a custom filesystem path.

Section: Resolver and Platform Controls

Install into a target directory

bash
bash
python -m pip install --target ./vendor requests
Explanation

Useful for zip apps, lambdas, or vendored packaging layouts.

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 Resolver and Platform Controls
Use eager upgrade strategy
Upgrade transitive dependencies more aggressively.
OpenIn sheetbashsame section
Require wheels for a package
Only accept binary wheels for a named package.
OpenIn sheetbashsame section
Resolve for a target platform and Python
Download distributions for another platform or interpreter version.
OpenIn sheetbashsame section
Install from requirements file
Install dependencies listed in a requirements file.
OpenIn sheetbash1 tag match
Install from a direct archive URL
Install from a remote source archive or wheel URL.
OpenIn sheetbash1 tag match
Install multiple requirements files
Combine base and environment-specific requirement lists.
OpenIn sheetbash1 tag match