跳转到内容

macOS 安装

需求最低配置推荐配置
macOS12 Monterey14 Sonoma+
Python3.103.11+
内存2GB4GB+
磁盘1GB5GB+
Terminal window
curl -fsSL https://raw.githubusercontent.com/NousResearch/hermes-agent/main/scripts/install.sh | bash

脚本会自动完成以下操作:

  • 安装 uv 包管理器
  • 检测并安装 Python 3.11(如需要)
  • 克隆代码仓库
  • 设置虚拟环境
  • 配置 PATH

安装完成后,重新加载 Shell:

Terminal window
source ~/.zshrc # macOS 默认使用 Zsh
Terminal window
curl -fsSL https://res1.hermesagent.org.cn/install.sh | bash

:::tip 国内用户 如果直接访问 GitHub 较慢,使用国内镜像可以获得更快的下载速度。 :::

Terminal window
brew install [email protected] git curl
Terminal window
git clone https://github.com/NousResearch/hermes-agent.git ~/.hermes-agent
cd ~/.hermes-agent
Terminal window
python3.11 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
Terminal window
echo 'alias hermes="~/.hermes-agent/.venv/bin/python -m hermes"' >> ~/.zshrc
source ~/.zshrc

如果你已经安装了 uv

Terminal window
uv tool install hermes-agent
Terminal window
hermes --version
hermes doctor

Hermes Agent 在 Apple Silicon 上完全原生运行,无需 Rosetta。部分依赖包在 ARM 架构下可能有特定的编译选项,hermes doctor 会自动检测并提示。

Terminal window
# 确认架构
uname -m
# arm64 = Apple Silicon
# x86_64 = Intel Mac

:::note 关于 Python 版本 macOS 自带的 Python 版本可能较低。建议使用 Homebrew 安装 Python 3.11+:

Terminal window
brew install [email protected]

:::

Terminal window
xcode-select --install
Terminal window
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Terminal window
# 修复 ~/.hermes 目录权限
sudo chown -R $(whoami) ~/.hermes