# 快速搭环境(同事用) ## 1. 装 Python ```powershell # 下载 Python 3.12 https://www.python.org/downloads/ # 安装时勾选 "Add Python to PATH" python --version pip install lark ``` ## 2. 装 GnuCOBOL ```powershell # 下载 GC32-BDB-SP1,解压 # 把 bin\ 目录加到系统 PATH cobc --version # → cobc (GnuCOBOL) 3.2.0 ``` ## 3. 拉代码 ```powershell cd D:\ git clone https://gittea.dev/hangshuo652/cobol-java-v3.git cd D:\cobol-java\cobol-java-v3 ``` ## 4. 跑验证 ```powershell # 快速测试(10秒) python test-data\s15_coverage_verification.py # → 17 PASS / 0 FAIL # 完整报告(2分钟) set PYTHONIOENCODING=utf-8 python test-data\s25_per_program_report.py # → TOTAL 3178 3178 100% ``` ## 常见问题 | 症状 | 解方 | |------|------| | `No module named 'lark'` | `pip install lark` | | `cobc: command not found` | 把 GnuCOBOL 的 `bin\` 加到 PATH | | `gbk codec can't encode` | `set PYTHONIOENCODING=utf-8` | | Permission denied | 以管理员身份运行终端 | 详细版 → `SETUP.md`