From c3fac8e905033d97e4fc6d39dbc7af51accdd721 Mon Sep 17 00:00:00 2001 From: Ofir Gluzman Date: Sun, 8 Mar 2026 14:11:40 +0200 Subject: [PATCH] Set PYTHONNOUSERSITE=1 to isolate bundled Python from system packages A system-wide Python 3.13 installation can leak user site-packages (e.g. torchvision) into the bundled runtime, causing import conflicts that crash the backend on startup. Fixes part of https://github.com/Lightricks/LTX-Desktop/issues/7 Co-Authored-By: Claude Opus 4.6 --- electron/python-backend.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/electron/python-backend.ts b/electron/python-backend.ts index 0a1c30c3..5d489bf0 100644 --- a/electron/python-backend.ts +++ b/electron/python-backend.ts @@ -221,6 +221,7 @@ export async function startPythonBackend(): Promise { env: { ...process.env, PYTHONUNBUFFERED: '1', + PYTHONNOUSERSITE: '1', LTX_PORT: String(PYTHON_PORT), LTX_APP_DATA_DIR: getAppDataDir(), PYTORCH_ENABLE_MPS_FALLBACK: '1',