Windows
以下说明将帮助你在 Windows 机器上从源代码安装独立的 Hummingbot 实例。
观看视频:
前提条件¶
Windows 子系统 for Linux 2 (WSL 2)¶
Hummingbot 专为 Unix 环境(如 macOS 或 Linux)设计,因此 Windows 用户在从源代码安装 Hummingbot 之前,应先安装 Windows 子系统 for Linux 2 (WSL 2)。
请注意:
- 你必须运行 Windows 10 2004 版本或更高版本(构建号 19041 或更高)或 Windows 11
- 需在 BIOS 设置中启用虚拟化功能。
如需排查 WSL 问题,请参阅此 链接
1. 以 管理员 身份打开 Powershell
在开始菜单中搜索 "Powershell",右键点击并选择“以管理员身份运行”

2. 运行安装 WSL 的命令
默认情况下,WSL 使用 Ubuntu Linux 发行版,该版本与 Hummingbot 兼容。
3. 启动 WSL
安装完成后,只需在 Powershell 或命令提示符中输入 wsl 即可。
注意:首次执行 WSL 时,系统会要求你创建一个新的默认用户名和密码。
4. 从 Windows 应用商店安装 Ubuntu
或者,在安装 WSL 后,可在 Windows 应用商店中搜索 Ubuntu,并将其作为应用安装到开始菜单中。这样,每次使用 Hummingbot 时就无需再打开 Powershell。

安装 Hummingbot¶
打开 Ubuntu 终端,按照 Linux 指南 从源代码安装 Hummingbot,或直接运行以下命令:
git clone https://github.com/hummingbot/hummingbot
cd hummingbot
./install
conda activate hummingbot
./compile
启动 Hummingbot¶
在 conda 环境中,运行以下命令启动 Hummingbot:
您将看到 Hummingbot 欢迎界面:

要开始使用 Hummingbot,请查阅以下文档:
如需运行 DEX 机器人,请安装 Hummingbot Gateway。
