app/docs/zh/deploy/install.md
Nanaloveyuki 908812a3d9
Some checks failed
Docker Image Build / build (push) Failing after 2m10s
Deploy VitePress site to Liteyuki PaaS / build (push) Failing after 2m30s
Pre-commit checks / pre-commit (3.10) (push) Failing after 3m7s
Pre-commit checks / pre-commit (3.11) (push) Failing after 2m37s
Pre-commit checks / pre-commit (3.12) (push) Failing after 2m42s
Pre-commit checks / pre-commit (3.13) (push) Failing after 3m18s
📝 重置了deploy下的文档
新添加了adapter.md用来转移配置器相关内容; 修改了部分文件的版权归属日期;
2025-04-03 21:54:03 +08:00

2.8 KiB
Executable File
Raw Blame History

title, order
title order
安装 1

安装

常规部署

安装基本环境

Git 版本管理工具 Git

Python3.10+ Python3.10+

克隆项目到本地轻雪使用Git进行版本管理该步骤为必要项

git clone https://github.com/LiteyukiStudio/LiteyukiBot --depth=1

若你不能访问Github可以使用Liteyuki镜像https://git.liteyuki.icu/bot/app

切换到Bot目录下

cd LiteyukiBot

如果存在文件夹缺失报错, 尝试使用绝对路径进行路径跳转

创建虚拟环境

python -m venv venv

如果出现相关虚拟环境错误, 建议查询 Python Venv

激活虚拟环境

Windows: .\venv\Scripts\activate

出现'activate' 不是内部或外部命令,也不是可运行的程序或批处理文件。错误, 请使用完整路径激活虚拟环境

Linux: source venv/bin/activate

如果出现source: command not found, 请使用完整路径激活虚拟环境

安装依赖

pip install -r requirements.txt

若出现ERROR: Could not open requirements file: [Errno 2] No such file or directory错误, 请检查是否在Bot目录下执行命令

若出现ERROR: Could not build wheels for xx, which is required to install pyproject.toml-based projects错误,请尝试使用手动命令安装相关依赖(虚拟环境下执行pip install xx,例如pip install Pillow)

启动Bot

python main.py

若出现ModuleNotFoundError: No module named 'xx'错误, 请尝试重新执行安装依赖步骤

使用Docker构建

docker pull ghcr.io/liteyukistudio/liteyukibot:latest  # 每夜版镜像

Tip

Windows请使用项目绝对目录/path/to/LiteyukiBot代替$(pwd)
若你修改了端口号请将20216:20216中的20216替换为你的端口号

装置要求

  • Windows系统版本推荐最低版本: Windows 10 21H2 / Windows Server 2019+

版本低于Windows 10 21H2 可能无法正常使用Bot, 建议升级系统版本或使用Docker部署

  • Linux系统要支持Python3.10+,推荐Ubuntu 20.04+(别用你那b CentOS)

  • CPU: 至少1vCPU

  • 内存: Bot无其他插件会占用300~500MB,包括chromiumnode等进程,其他插件占用视具体插件而定,建议1GB以上

  • 硬盘: 至少1GB空间

Warning

如果装置上有多个环境,请使用path/to/python -m pip install -r requirements.txt来安装依赖,path/to/python 为你的Python可执行文件路径

Warning

轻雪的更新功能依赖Git如果你没有安装Git直接下载源代码运行你将无法使用更新功能(除非你闲的手动下载源代码更新轻雪~~)

其他问题请移步至答疑