From fff5c4bc741adcff2ea3cd6a1a4251c4deb0e52d Mon Sep 17 00:00:00 2001 From: Junyan Qin Date: Wed, 14 May 2025 19:35:43 +0800 Subject: [PATCH] chore: remove requirements.txt --- docs/en/deploy/langbot/manual.md | 33 +++++++------------------------- docs/en/develop/dev-config.md | 7 ++++--- docs/zh/deploy/langbot/manual.md | 23 +++++++++------------- docs/zh/develop/dev-config.md | 7 ++++--- 4 files changed, 24 insertions(+), 46 deletions(-) diff --git a/docs/en/deploy/langbot/manual.md b/docs/en/deploy/langbot/manual.md index d95952c47..b89b3a104 100644 --- a/docs/en/deploy/langbot/manual.md +++ b/docs/en/deploy/langbot/manual.md @@ -21,13 +21,6 @@ git clone https://github.com/RockChinQ/LangBot cd LangBot ``` -If you are in mainland China, you can clone from the [GitCode mirror](https://gitcode.com/RockChinQ/LangBot): - -```bash -git clone https://gitcode.com/RockChinQ/LangBot -cd LangBot -``` - Then manually build the frontend: ```bash @@ -39,31 +32,19 @@ cd .. ::: -2. (Recommended) Create a virtual environment +2. Install dependencies -On some Linux systems that use system package managers to manage Python dependencies, dependency conflicts may occur, so please use venv to create a virtual environment. Windows users can skip this step. +We use uv to manage dependencies. ```bash -python -m venv venv -source venv/bin/activate +pip install uv +uv sync ``` -3. Install dependencies +3. Run the main program once to generate configuration files ```bash -pip install -r requirements.txt -``` - -Or use Tsinghua mirror - -```bash -pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple -``` - -4. Run the main program once to generate configuration files - -```bash -python main.py +uv run main.py ``` You will see the following message: @@ -83,4 +64,4 @@ The following files do not exist and have been automatically generated. Please m ... ``` -You can now use Ctrl+C to exit the program and continue to the [Deploy Message Platform](/en/deploy/platforms/readme) page. +You can now use Ctrl+C to exit the program and continue to the [Deploy Bots](/en/deploy/platforms/readme) page. diff --git a/docs/en/develop/dev-config.md b/docs/en/develop/dev-config.md index 1da578098..992b3598a 100644 --- a/docs/en/develop/dev-config.md +++ b/docs/en/develop/dev-config.md @@ -8,16 +8,17 @@ LangBot is divided into frontend and backend. The frontend is developed using Ne The code is located in the `pkg` directory and is started by the `main.py` file in the root directory. -Install dependencies +Install dependencies, we use uv to manage dependencies. ```bash -pip install -r requirements.txt +pip install uv +uv sync ``` Start the backend ```bash -python main.py +uv run main.py ``` At this point, the configuration file will be automatically generated in the `data/config.yaml` file. diff --git a/docs/zh/deploy/langbot/manual.md b/docs/zh/deploy/langbot/manual.md index d3b404f2e..a868f1594 100644 --- a/docs/zh/deploy/langbot/manual.md +++ b/docs/zh/deploy/langbot/manual.md @@ -40,31 +40,26 @@ cd .. ::: -2. (建议)创建虚拟环境 +2. 安装依赖 -在一些使用系统包管理器管理 Python 依赖的 Linux 系统上,可能会出现依赖冲突,故请使用 venv 创建虚拟环境。Windows 用户可以跳过此步骤。 +我们使用 uv 管理依赖。 ```bash -python -m venv venv -source venv/bin/activate -``` - -3. 安装依赖 - -```bash -pip install -r requirements.txt +pip install uv +uv sync ``` 或者使用清华源 ```bash -pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple +pip install uv -i https://pypi.tuna.tsinghua.edu.cn/simple +uv sync ``` -4. 运行一次主程序,生成配置文件 +3. 运行一次主程序,生成配置文件 ```bash -python main.py +uv run main.py ``` 提示如下信息 @@ -84,4 +79,4 @@ python main.py ... ``` -接下来可以使用 Ctrl+C 退出程序,继续查看[部署消息平台](/zh/deploy/platforms/readme)页。 +接下来可以使用 Ctrl+C 退出程序,继续查看[部署机器人](/zh/deploy/platforms/readme)页。 diff --git a/docs/zh/develop/dev-config.md b/docs/zh/develop/dev-config.md index fcd9d5dc3..4ef025cdf 100644 --- a/docs/zh/develop/dev-config.md +++ b/docs/zh/develop/dev-config.md @@ -8,16 +8,17 @@ LangBot 分为前端和后端,前端使用 Next.js + shadcn 开发,后端通 代码位于 `pkg` 目录下,由根目录的 `main.py` 文件引导启动。 -安装依赖 +安装依赖,我们使用 uv 管理依赖。 ```bash -pip install -r requirements.txt +pip install uv +uv sync ``` 启动后端 ```bash -python main.py +uv run main.py ``` 此时配置文件会自动生成到 `data/config.yaml` 文件中。