This repository was archived by the owner on Mar 11, 2026. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66> 以下教程默认您的设备上已经安装 Python,并且版本 ` >=3.10 `
77
88
9- ## 下载源码
9+ ## 下载/克隆仓库
1010
1111如果你的电脑上安装了 ` git ` ,你可以通过以下命令来下载源码:
1212
@@ -21,7 +21,20 @@ cd AstrBot
2121
2222![ ] ( ../../source/images/cli/image.png )
2323
24- ## 运行源码
24+ ## 安装依赖并运行
25+
26+ ::: details 【🥳推荐】使用 ` uv ` 管理依赖
27+
28+ > 如果没安装 ` uv ` ,请参考 [ Installing uv] ( https://docs.astral.sh/uv/getting-started/installation/ ) 安装。
29+
30+ 2 . 在终端执行(AstrBot 目录下)
31+ ``` bash
32+ uv sync
33+ uv run main.py
34+ ```
35+ :::
36+
37+ ::: details Python 内置 venv 安装依赖
2538
2639在 AstrBot 源码目录下,使用终端运行以下命令:
2740
@@ -34,9 +47,9 @@ python3 -m venv ./venv
3447
3548> 也可能是 ` python ` 而不是 ` python3 `
3649
37- 以上步骤会创建一个虚拟环境并激活(以免打乱你电脑本地的 Python 环境),并使用清华大学的镜像源来安装 AstrBot 的依赖。依赖的安装需要花费一些时间 。
50+ 以上步骤会创建一个虚拟环境并激活(以免打乱您设备本地的 Python 环境)。
3851
39- 接下来,通过以下命令安装依赖文件:
52+ 接下来,通过以下命令安装依赖文件,这可能需要花费一些时间 :
4053
4154Mac/Linux/WSL 执行:
4255
@@ -46,20 +59,14 @@ python -m pip install -r requirements.txt -i https://mirrors.tuna.tsinghua.edu.c
4659python main.py
4760```
4861
49- > [ !TIP]
50- > AstrBot 支持基于 Docker 的沙箱代码执行器。如果你需要使用沙箱代码执行器,请使用 ` sudo ` 以便 AstrBot 能够正常操作 Docker。
51- > ``` bash
52- > sudo -E venv/bin/python3 main.py
53- > ` ` `
54-
55-
5662Windows 执行:
5763
5864``` bash
5965venv\S cripts\a ctivate
6066python -m pip install -r requirements.txt -i https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple
6167python main.py
6268```
69+ :::
6370
6471
6572## 🎉 大功告成!
Original file line number Diff line number Diff line change 11# 通过 Linux 一键脚本安装
22
3- > 该脚本由社区 ** @小馒头** 提供,感谢!❤
3+ > [ !WARNING]
4+ > 1 . 该脚本由社区 ** @小馒头** 提供(感谢❤)。
5+ > 2 . AstrBot 团队不保证该脚本的可用性,并且不参与该脚本的维护工作。我们推荐 Linux 用户手动部署或者通过 Docker 部署 AstrBot。
46
57![ ] ( ../../source/images/linux-one/5bae97bb68f367923f63dd3f1607a7df.png )
68
You can’t perform that action at this time.
0 commit comments