From 2d492587fbc88f018a8d73740a70753ac5a68263 Mon Sep 17 00:00:00 2001 From: Soulter <37870767+Soulter@users.noreply.github.com> Date: Sun, 15 Dec 2024 17:00:18 +0800 Subject: [PATCH] Update cli.md --- deploy/astrbot/cli.md | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/deploy/astrbot/cli.md b/deploy/astrbot/cli.md index e578283..1022d4a 100644 --- a/deploy/astrbot/cli.md +++ b/deploy/astrbot/cli.md @@ -23,15 +23,27 @@ cd AstrBot ```bash python3 -m venv ./venv +source venv/bin/activate +``` + +以上步骤会创建一个虚拟环境并激活(以免打乱你电脑本地的 Python 环境),并使用清华大学的镜像源来安装 AstrBot 的依赖。依赖的安装需要花费一些时间。 + +接下来,通过以下命令安装依赖文件: + +```bash python3 -m pip install -r requirements.txt -i https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple ``` -以上步骤会创建一个虚拟环境(以免打乱你电脑本地的 Python 环境),并使用清华大学的镜像源来安装 AstrBot 的依赖。依赖的安装需要花费一些时间。 +> [!TIP] +> 推荐使用更快的 uv 工具来安装依赖文件(平均快 10-100 倍): +> ```bash +> python3 -m pip install uv +> python3 -m uv pip install -r requirements.txt -i https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple +> ``` -接下来,通过以下命令来运行 AstrBot: +然后运行 AstrBot ```bash -source venv/bin/activate python3 main.py ``` @@ -47,4 +59,4 @@ python3 main.py > 默认用户名和密码是 `astrbot` 和 `astrbot`。 -接下来,你需要部署任何一个消息平台,才能够实现在消息平台上使用 AstrBot。 \ No newline at end of file +接下来,你需要部署任何一个消息平台,才能够实现在消息平台上使用 AstrBot。