uv lock
Update the project's lockfile. More information: https://docs.astral.sh/uv/reference/cli/#uv-lock.
- Create or update the project's lockfile:
uv lock
- Check if the lockfile is up-to-date without updating it:
uv lock --check
- Assert that a lockfile exists without checking if it's current:
uv lock --check-exists
- Simulate locking, showing what would be locked without writing the lockfile:
uv lock --dry-run
- Lock a specific Python script instead of the current project:
uv lock --script
- Upgrade all packages to their latest compatible versions:
uv lock --upgrade
- Upgrade only specific packages:
uv lock --upgrade-package --upgrade-package
来源:tldr-pages contributors · 作者与贡献记录 · CC BY 4.0。离线整理了版式、链接和媒体显示。
