macOS 安装
| 需求 | 最低配置 | 推荐配置 |
|---|---|---|
| macOS | 12 Monterey | 14 Sonoma+ |
| Python | 3.10 | 3.11+ |
| 内存 | 2GB | 4GB+ |
| 磁盘 | 1GB | 5GB+ |
方式一:一键安装(推荐)
Section titled “方式一:一键安装(推荐)”curl -fsSL https://raw.githubusercontent.com/NousResearch/hermes-agent/main/scripts/install.sh | bash脚本会自动完成以下操作:
- 安装
uv包管理器 - 检测并安装 Python 3.11(如需要)
- 克隆代码仓库
- 设置虚拟环境
- 配置 PATH
安装完成后,重新加载 Shell:
source ~/.zshrc # macOS 默认使用 Zshcurl -fsSL https://res1.hermesagent.org.cn/install.sh | bash:::tip 国内用户 如果直接访问 GitHub 较慢,使用国内镜像可以获得更快的下载速度。 :::
方式二:Homebrew 安装
Section titled “方式二:Homebrew 安装”第 1 步:安装依赖
Section titled “第 1 步:安装依赖”第 2 步:克隆代码仓库
Section titled “第 2 步:克隆代码仓库”git clone https://github.com/NousResearch/hermes-agent.git ~/.hermes-agentcd ~/.hermes-agent第 3 步:创建虚拟环境
Section titled “第 3 步:创建虚拟环境”python3.11 -m venv .venvsource .venv/bin/activatepip install -r requirements.txt第 4 步:添加到 PATH
Section titled “第 4 步:添加到 PATH”echo 'alias hermes="~/.hermes-agent/.venv/bin/python -m hermes"' >> ~/.zshrcsource ~/.zshrc方式三:使用 uv 直接安装
Section titled “方式三:使用 uv 直接安装”如果你已经安装了 uv:
uv tool install hermes-agenthermes --versionhermes doctorApple Silicon (M1/M2/M3/M4) 注意事项
Section titled “Apple Silicon (M1/M2/M3/M4) 注意事项”Hermes Agent 在 Apple Silicon 上完全原生运行,无需 Rosetta。部分依赖包在 ARM 架构下可能有特定的编译选项,hermes doctor 会自动检测并提示。
# 确认架构uname -m# arm64 = Apple Silicon# x86_64 = Intel Mac:::note 关于 Python 版本 macOS 自带的 Python 版本可能较低。建议使用 Homebrew 安装 Python 3.11+:
:::
Xcode Command Line Tools 缺失
Section titled “Xcode Command Line Tools 缺失”xcode-select --installHomebrew 未安装
Section titled “Homebrew 未安装”/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"# 修复 ~/.hermes 目录权限sudo chown -R $(whoami) ~/.hermes