docs: 增加Python虚拟环境依赖说明

This commit is contained in:
Nixevol
2026-07-03 02:08:27 +08:00
parent d8e427b958
commit b6bde001bc
4 changed files with 33 additions and 5 deletions
+19 -2
View File
@@ -2,10 +2,27 @@
所有环境配置集中在 [`config.yaml`](./config.yaml)(带注释)。脚本会据此自动生成根目录 `.env`,**无需手改 .env**。
脚本现在直接用本机 Python 运行。首次运行前请先安装脚本依赖:
脚本现在直接用本机 Python 运行。建议使用项目内虚拟环境,避免污染全局 Python。
首次运行前:
```bash
python -m pip install pyyaml psutil pymysql
python -m venv .venv
.\.venv\Scripts\Activate.ps1
python -m pip install -r scripts/requirements.txt
```
如果 PowerShell 阻止激活脚本,可在当前终端临时放行后再激活:
```bash
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
.\.venv\Scripts\Activate.ps1
```
之后每次运行脚本前,先激活虚拟环境:
```bash
.\.venv\Scripts\Activate.ps1
```
| 脚本 | 作用 |
+3
View File
@@ -0,0 +1,3 @@
pyyaml
psutil
pymysql