1. 安装 Aider
Aider 提供多种安装方式,适用于不同操作系统和用户需求。以下是详细的安装步骤:
1.1 使用 aider-install
(推荐)
适用场景:已安装 Python 3.8-3.13 的系统,自动管理独立环境。
步骤:
- 安装
aider-install
工具:python -m pip install aider-install
- 运行安装命令,Aider 会自动创建独立 Python 环境(必要时安装 Python 3.12):
aider-install
- 安装完成后,即可通过
aider
命令启动。
1.2 一键安装脚本
适用场景:快速安装,自动处理 Python 依赖(推荐新手使用)。
Mac & Linux
使用 curl
或 wget
执行安装脚本:
# 使用 curl
curl -LsSf https://aider.chat/install.sh | sh
# 若系统无 curl,使用 wget
wget -qO- https://aider.chat/install.sh | sh
Windows
在 PowerShell 中执行:
powershell -ExecutionPolicy ByPass -c "irm https://aider.chat/install.ps1 | iex"
1.3 使用 uv
安装
适用场景:需要高效依赖管理的用户,uv
是快速的 Python 包管理器。
- 安装
uv
(若未安装):python -m pip install uv
- 使用
uv
安装 Aider,指定 Python 3.12:uv tool install --force --python python3.12