UV常见配置

astral-sh/uv: An extremely fast Python package and project manager, written in Rust.

[pip]
index-url = "https://mirrors.aliyun.com/pypi/simple/"
[tool.uv]
index-url = "https://mirrors.aliyun.com/pypi/simple/"

[tool.uv.sources]
torch = [
    { index = "pytorch-cpu" },
]
torchvision = [
    { index = "pytorch-cpu" },
]

[[tool.uv.index]]
name = "pytorch-cpu"
url = "https://download.pytorch.org/whl/cpu"
explicit = true

更新Python版本

uv python upgrade

更新所有依赖

uv sync -U

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注