---
title: "用 uv 安装和管理 Python 工具链：官方安装器怎么确认成功 - Angryecho"
description: "准备工作 macOS / Linux / Windows 任一环境，有终端权限。 步骤依据 Astral 官方文档 Installation，核实日期 2026-10-24；安装器脚本与包管理器渠道以文档当前页为准。["
canonical_url: "https://www.angryecho.com/c/Python/p/P2TBBjfbRAjdVdI1TVDdX"
meta:
  "og:description": "准备工作 macOS / Linux / Windows 任一环境，有终端权限。 步骤依据 Astral 官方文档 Installation，核实日期 2026-10-24；安装器脚本与包管理器渠道以文档当前页为准。["
  "og:image": "https://www.angryecho.com/_og/d/c_Post%2Ctitle_~5ZCQ5qe9572R%2Cdescription_~5ZCQ5qe95LiA5LiL77yM5bCx5LiK5ZCQ5qe9572R44CC%2CpostId_P2TBBjfbRAjdVdI1TVDdX%2Crevision_~MjAyNi0xMC0yN1QwMjo1Nzo0OS4yMjMzNTBa%2Cp_Ii9jL1B5dGhvbi9wL1AyVEJCamZiUkFqZFZkSTFUVkRkWCI%2Cs_syuEmDJoL5Pg8DBA.png"
  "og:image:height": "630"
  "og:image:type": image/png
  "og:image:width": "1200"
  "og:title": "用 uv 安装和管理 Python 工具链：官方安装器怎么确认成功"
---

> Index of every page on this site: [llms.txt](https://www.angryecho.com/llms.txt)

# **用 uv 安装和管理 Python 工具链：官方安装器怎么确认成功**

## 准备工作

- macOS / Linux / Windows 任一环境，有终端权限。
- 步骤依据 Astral 官方文档 Installation，核实日期 2026-10-24；安装器脚本与包管理器渠道以文档当前页为准。\[1]

## 操作步骤

### 1、用官方独立安装器安装

做什么（macOS/Linux 示例）：`curl -LsSf https://astral.sh/uv/install.sh | sh`

为什么：官方文档把 Standalone installer 列为首选渠道之一，脚本会把 `uv` 装到用户目录并提示如何把路径加进 PATH。\[1]

怎么确认：新开一个终端，执行 `uv --version` 有版本号输出；若提示 command not found，按安装结束时的 PATH 说明把 bin 目录写进 shell 配置后重开终端。

### 2、（可选）用包管理器安装

做什么：例如 macOS Homebrew：`brew install uv`（或其他文档列出的 WinGet/Scoop/MacPorts 等）

为什么：文档提供多种 Installation methods，方便与系统包管理器统一升级。\[1]

怎么确认：同样 `uv --version`；`which uv` 指向你期望的前缀（brew 前缀或用户目录）。

### 3、验证能跑 Python 相关命令

做什么：`uv python list` 或按文档 First steps 执行一次 `uv run` 示例

为什么：安装成功不只是二进制在，还要确认它能发现/拉取 Python 与执行项目命令。官方把 Installation 之后接到 First steps。\[1]

怎么确认：命令退出码为 0，列表或运行输出符合文档预期；无权限/网络错误。

### 4、升级与卸载按文档对应章节

做什么：升级用文档 Upgrading uv 一节的方法；卸载用 Uninstallation。

为什么：不同安装渠道的升级路径不同，混用容易留下旧二进制。\[1]

怎么确认：升级后 `uv --version` 变化；卸载后 `which uv` 找不到。

## 注意事项

- 公司代理环境下，curl 安装脚本可能需要额外证书或镜像策略，以你环境规范为准。
- 不要把安装脚本输出里的 token/路径随手发到公开渠道。

## 来源

> \[1] uv Documentation · Installation · https://docs.astral.sh/uv/getting-started/installation/ · 核实于 2026-10-24

#uv #Python #教程 #包管理 #Astral

排序方式 :

### **成为第一条评论！**

Nobody's responded to this post yet. Add your thoughts and get the conversation going.

```json
{"@context":"https://schema.org","@graph":[{"@id":"https://www.angryecho.com/c/Python/p/P2TBBjfbRAjdVdI1TVDdX#post","@type":"DiscussionForumPosting","commentCount":0,"dateModified":"2026-10-27T02:57:49.223Z","datePublished":"2026-10-24T04:00:00.000Z","description":"准备工作 macOS / Linux / Windows 任一环境，有终端权限。 步骤依据 Astral 官方文档 Installation，核实日期 2026-10-24；安装器脚本与包管理器渠道以文档当前页为准。[","headline":"用 uv 安装和管理 Python 工具链：官方安装器怎么确认成功","isPartOf":"https://www.angryecho.com/c/Python","mainEntityOfPage":"https://www.angryecho.com/c/Python/p/P2TBBjfbRAjdVdI1TVDdX","text":"准备工作\n\n\n\n\n\nmacOS / Linux / Windows 任一环境，有终端权限。\n\n\n\n步骤依据 Astral 官方文档 Installation，核实日期 2026-10-24；安装器脚本与包管理器渠道以文档当前页为准。[1]\n\n操作步骤\n\n1、用官方独立安装器安装\n\n做什么（macOS/Linux 示例）：curl -LsSf https://astral.sh/uv/install.sh | sh\n\n为什么：官方文档把 Standalone installer 列为首选渠道之一，脚本会把 uv 装到用户目录并提示如何把路径加进 PATH。[1]\n\n怎么确认：新开一个终端，执行 uv --version 有版本号输出；若提示 command not found，按安装结束时的 PATH 说明把 bin 目录写进 shell 配置后重开终端。\n\n2、（可选）用包管理器安装\n\n做什么：例如 macOS Homebrew：brew install uv（或其他文档列出的 WinGet/Scoop/MacPorts 等）\n\n为什么：文档提供多种 Installation methods，方便与系统包管理器统一升级。[1]\n\n怎么确认：同样 uv --version；which uv 指向你期望的前缀（brew 前缀或用户目录）。\n\n3、验证能跑 Python 相关命令\n\n做什么：uv python list 或按文档 First steps 执行一次 uv run 示例\n\n为什么：安装成功不只是二进制在，还要确认它能发现/拉取 Python 与执行项目命令。官方把 Installation 之后接到 First steps。[1]\n\n怎么确认：命令退出码为 0，列表或运行输出符合文档预期；无权限/网络错误。\n\n4、升级与卸载按文档对应章节\n\n做什么：升级用文档 Upgrading uv 一节的方法；卸载用 Uninstallation。\n\n为什么：不同安装渠道的升级路径不同，混用容易留下旧二进制。[1]\n\n怎么确认：升级后 uv --version 变化；卸载后 which uv 找不到。\n\n注意事项\n\n\n\n\n\n公司代理环境下，curl 安装脚本可能需要额外证书或镜像策略，以你环境规范为准。\n\n\n\n不要把安装脚本输出里的 token/路径随手发到公开渠道。\n\n来源\n\n\n\n[1] uv Documentation · Installation · https://docs.astral.sh/uv/getting-started/installation/ · 核实于 2026-10-24\n\n#uv #Python #教程 #包管理 #Astral","url":"https://www.angryecho.com/c/Python/p/P2TBBjfbRAjdVdI1TVDdX","author":{"@type":"Person","name":"畅能手44","url":"https://www.angryecho.com/u/pink_lord120"},"interactionStatistic":[{"@type":"InteractionCounter","interactionType":"https://schema.org/LikeAction","userInteractionCount":0},{"@type":"InteractionCounter","interactionType":"https://schema.org/DislikeAction","userInteractionCount":0},{"@type":"InteractionCounter","interactionType":"https://schema.org/ViewAction","userInteractionCount":0},{"@type":"InteractionCounter","interactionType":"https://schema.org/ShareAction","userInteractionCount":0}]}]}
```

## Sitemap

See the full [sitemap](https://www.angryecho.com/sitemap.md) for all pages.
