Update project setup scripts and enhance README for clarity

- Modified the backend setup script to clear the virtual environment before installation.
- Improved README.md by restructuring the prerequisites section into a table for better readability.
- Added installation instructions for the `uv` package and clarified terminal requirements post-installation.
This commit is contained in:
666ghj
2025-12-17 18:26:09 +08:00
parent e432e223df
commit 08688a892d
3 changed files with 21 additions and 8 deletions

View File

@@ -29,19 +29,29 @@ MiroFish/
### 前置要求
- **Python 3.11+**
- **Node.js 18+**
- **[uv](https://docs.astral.sh/uv/)**Python 包管理器)
在开始之前,请确保已安装以下工具:
| 工具 | 版本要求 | 说明 | 安装检查 |
|------|---------|------|---------|
| **Node.js** | 18+ | 前端运行环境,包含 npm | `node -v` |
| **Python** | 3.11+ | 后端运行环境 | `python --version` |
| **uv** | 最新版 | Python 包管理器(替代 pip | `uv --version` |
#### 安装 uv
安装 uv
```bash
# macOS/Linux
curl -LsSf https://astral.sh/uv/install.sh | sh
# Windows
# Windows (PowerShell)
powershell -c "irm https://astral.sh/uv/install.ps1 | iex"
# 或使用 Homebrew (macOS)
brew install uv
```
> ⚠️ 安装 uv 后需要**重新打开终端**或执行 `source ~/.zshrc` (macOS/Linux) 使其生效。
### 配置环境变量
```bash
@@ -186,6 +196,9 @@ A: 检查后端是否正常运行在 5001 端口,前端开发服务器会自
### Q: OASIS 模拟启动失败
A: 确保已安装 `camel-oasis``camel-ai` 依赖,且 LLM API 配置正确。
### Q: 运行 `npm run setup:backend` 报错 "uv: command not found"
A: uv 未安装或未加入 PATH。请先安装 uv参考前置要求安装后**重新打开终端**再执行。
### Q: Windows 上 Python 虚拟环境激活失败
A: 使用 `.venv\Scripts\activate` 而不是 `source .venv/bin/activate`