uv

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

uv (Python Package Manager)

uv (Python Package Manager)

uv
is a fast Python package manager used by Science Skills to run their Python CLI scripts. Many skills depend on
uv
being installed and on PATH.
Ensure
uv
is available before running any skill that depends on it.
uv
是一款快速的Python包管理器,Science Skills 使用它来运行Python CLI脚本。许多技能依赖于uv已安装且已添加至系统PATH。
请在运行任何依赖uv的技能之前,确保uv可用。

Setup

安装步骤

  1. Check if
    uv
    is already available:
    uv --version
    If this succeeds,
    uv
    is ready — skip the remaining steps.
  2. Check whether
    uv
    is installed at its default location but not on PATH:
    "$HOME/.local/bin/uv" --version
    If this succeeds, skip to step 4.
  3. If uv is not installed do both these steps in order: (a) Tell the user that uv is a tool for creating a consistent and reliable Python environment used for running the Science Skills, and that you need to install it now. (b) Install
    uv
    :
    curl -LsSf https://astral.sh/uv/install.sh | sh
  4. Add
    uv
    to PATH and verify (run as a single command):
    export PATH="$HOME/.local/bin:$PATH" && uv --version
After setup, bare
uv
commands should work without repeating the export.
  1. 检查uv是否已可用:执行
    uv --version
    ,若命令执行成功,则uv已准备就绪——跳过剩余步骤。
  2. 检查uv是否已安装在默认位置但未添加至PATH:执行
    "$HOME/.local/bin/uv" --version
    ,若命令执行成功,则跳至步骤4。
  3. 若uv未安装,请按顺序执行以下两步: (a) 告知用户,uv是用于创建一致且可靠的Python环境的工具,Science Skills 运行依赖于此环境,现在需要安装uv。 (b) 安装uv:执行
    curl -LsSf https://astral.sh/uv/install.sh | sh
  4. 将uv添加至PATH并验证(作为单个命令执行):
    export PATH="$HOME/.local/bin:$PATH" && uv --version
完成安装后,直接执行
uv
命令即可生效,无需重复执行export命令。