Skip to main content
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
package[]
Exclude specific packages from output.
--exclude-editable
Exclude editable packages from output.

Python Environment

-p, --python
string
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_PYTHON
--path
path[]
List packages from specific installation paths.Can be provided multiple times.
-t, --target
path
List packages from a --target directory.
--prefix
path
List packages from a --prefix directory.

Validation

--strict
Validate the environment, detecting packages with missing dependencies.

Output Format

The output is in requirements.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

  1. Performance: uv is faster, especially with large environments
  2. Default environment: uv requires virtual environment by default
  3. Output format: Identical to pip freeze
  4. Validation: uv adds --strict for dependency checking

Migration from pip

Comparison with uv pip list

uv pip freeze and uv pip list serve different purposes: