This commit is contained in:
eric
2026-05-20 23:50:43 -05:00
parent 882ea9268c
commit e6e4f7a02e
17 changed files with 570 additions and 188 deletions

View File

@@ -51,7 +51,10 @@ if (!ffmpegExe) {
if (pythonExe) {
const check = spawnSync(
pythonExe,
['-c', 'import fastapi,uvicorn,requests,psutil;print("runtime_ok")'],
[
'-c',
'import importlib.util,fastapi,uvicorn,requests,psutil,src; assert importlib.util.find_spec("web2"); print("runtime_ok")',
],
{
cwd: backendRoot,
encoding: 'utf8',
@@ -61,7 +64,7 @@ if (pythonExe) {
)
if (check.status !== 0) {
errors.push(
`内置 Python 缺少运行依赖fastapi/uvicorn/requests/psutil\n请先在 ${path.join(
`内置 Python 缺少运行依赖或无法导入后端模块fastapi/uvicorn/requests/psutil/web2/src)。\n请先在 ${path.join(
backendRoot,
'python',
)} 环境安装 requirements.txt。\n\nstdout:\n${check.stdout || '(empty)'}\n\nstderr:\n${check.stderr || '(empty)'}`,