@echo off REM 离线安装脚本 — 把项目拷到离线机器后运行此文件 REM 要求: Python 3.12.x 已装, pip 已可用 setlocal set PYTHON=python %PYTHON% --version >nul 2>&1 if errorlevel 1 ( echo [ERR] python not in PATH exit /b 1 ) echo === Installing offline wheels from dist\ === pushd "%~dp0dist" %PYTHON% -m pip install --no-index --find-links=. -r "..\requirements.txt" set RC=%ERRORLEVEL% popd if %RC% NEQ 0 ( echo [ERR] pip install failed, code=%RC% exit /b %RC% ) echo === Verifying imports === %PYTHON% -c "import yaml, pandas, openpyxl, bs4, MetaTrader5; print('All deps OK')" if errorlevel 1 ( echo [WARN] Some imports failed. Check Python version matches wheel cp tag (this build is cp312 / Python 3.12). ) echo. echo Done. pause