src / Python / pythonEnv.ts
import { spawnSync } from "child_process";
export function ensurePython() {
const result = spawnSync("python3", ["-c", "import sys; print('ok')"], {
encoding: "utf-8",
});
if (result.status !== 0) {
throw new Error("Python3 is not available in PATH");
}
}
export function getPython() {
return "python3";
}