uv pip freeze outputs installed packages in a format compatible with requirements.txt. It is similar to pip freeze but faster and integrates with uv’s caching system.
Usage
Arguments
Filtering Options
Exclude specific packages from output.
--exclude-editable
Exclude editable packages from output.
Python Environment
Python interpreter from which to list packages.By default, lists from virtual environment or system Python if no venv is found.Environment:
UV_PYTHON--system
List packages from system Python, ignoring virtual environments.Environment:
UV_SYSTEM_PYTHONList packages from specific installation paths.Can be provided multiple times.
List packages from a
--target directory.List packages from a
--prefix directory.Validation
--strict
Validate the environment, detecting packages with missing dependencies.
Output Format
The output is inrequirements.txt format:
Editable Packages
Editable packages are listed with their source location:Examples
Basic Usage
Filter Output
Specific Environment
Validation
Use Cases
Generate Requirements File
Compare Environments
Docker Images
Debugging
Differences from pip freeze
uv pip freeze is largely compatible with pip freeze:
Key Differences
- Performance: uv is faster, especially with large environments
- Default environment: uv requires virtual environment by default
- Output format: Identical to pip freeze
- Validation: uv adds
--strictfor dependency checking
Migration from pip
Comparison with uv pip list
uv pip freeze and uv pip list serve different purposes:
| Feature | uv pip freeze | uv pip list |
|---|---|---|
| Format | requirements.txt | Human-readable table |
| Editables | Shows source paths | Shows as installed |
| Use case | Reproducible installs | Viewing packages |
| Output formats | Text only | Text, JSON, freeze |
Related Commands
uv pip list- List packages in table formatuv pip show- Show package detailsuv pip compile- Generate lockfile with resolution