Files
mech-ai/run_backend_python.ps1
T
2026-07-17 17:45:56 +08:00

14 lines
408 B
PowerShell

$ErrorActionPreference = "Stop"
$Root = Split-Path -Parent $MyInvocation.MyCommand.Path
$Venv = Join-Path $Root ".venv"
$Python = Join-Path $Venv "Scripts\python.exe"
if (!(Test-Path $Python)) {
py -3 -m venv $Venv
}
& $Python -m pip install -r (Join-Path $Root "requirements.txt")
$env:PYTHONPATH = Join-Path $Root "backend"
& $Python -m uvicorn agent4.main:app --host 127.0.0.1 --port 7200 --reload