← 返回命令列表

Linux command

uv-pip 命令

网络

复制后可按需替换文件名、目录或参数。

常用示例

Install a package

uv pip install [package]

Install

uv pip install -r requirements.txt

Install into the system Python

uv pip install --system [package]

Uninstall

uv pip uninstall [package]

List installed

uv pip list

Freeze

uv pip freeze

Compile

uv pip compile [requirements.in] -o requirements.txt

Sync

uv pip sync requirements.txt

说明

uv pip provides pip-compatible commands powered by uv's Rust-based resolver and installer. It is a drop-in replacement for `pip`, `pip-tools`, and `virtualenv` for non-project workflows, typically 10-100x faster. Unlike `pip`, `uv pip` does not automatically create or activate a virtual environment. It either uses the active `.venv` / `VIRTUAL_ENV` or requires `--system` to operate on the system Python.

参数

-r, --requirement _FILE_
Install from the given requirements file (repeatable).
-e, --editable _PATH_
Install a project in editable mode.
-U, --upgrade
Allow upgrading already-installed packages.
--system
Operate on the system Python rather than a virtual environment.
--python _PATH_
Use the specified Python interpreter.
--index-url _URL_
Override the package index URL.
--no-deps
Skip installing dependencies.
--reinstall
Reinstall all packages even if already installed.
--dry-run
Resolve without modifying the environment.

FAQ

What is the uv-pip command used for?

uv pip provides pip-compatible commands powered by uv's Rust-based resolver and installer. It is a drop-in replacement for `pip`, `pip-tools`, and `virtualenv` for non-project workflows, typically 10-100x faster. Unlike `pip`, `uv pip` does not automatically create or activate a virtual environment. It either uses the active `.venv` / `VIRTUAL_ENV` or requires `--system` to operate on the system Python.

How do I run a basic uv-pip example?

Run `uv pip install [package]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -r, --requirement _FILE_ do in uv-pip?

Install from the given requirements file (repeatable).