Linux command
uv-sync 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Sync environment
uv sync
Sync without dev dependencies
uv sync --no-dev
Sync specific extra
uv sync --extra [name]
Sync from frozen lock
uv sync --frozen
说明
uv sync synchronizes the virtual environment with project dependencies. Creates venv if needed, installs/removes packages to match lockfile. Core command for environment management.
参数
- --frozen
- Error if lock needs update.
- --locked
- Assert lockfile is current.
- --no-dev
- Skip dev dependencies.
- --extra _name_
- Include optional extra.
- --all-extras
- Include all extras.
FAQ
What is the uv-sync command used for?
uv sync synchronizes the virtual environment with project dependencies. Creates venv if needed, installs/removes packages to match lockfile. Core command for environment management.
How do I run a basic uv-sync example?
Run `uv sync` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does --frozen do in uv-sync?
Error if lock needs update.