From f00c16da13b8c3bed1ef5a610fe499fa28a733af Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Fri, 24 Jan 2025 11:38:35 +1100 Subject: [PATCH] fix: manually specify venv when installing invokeai pkg --- src/main/install-manager.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/install-manager.ts b/src/main/install-manager.ts index 69cd4fc..7e2ecc5 100644 --- a/src/main/install-manager.ts +++ b/src/main/install-manager.ts @@ -311,6 +311,10 @@ export class InstallManager { installInvokeArgs.push(`--index=${torchIndexUrl}`); } + // Manually set the VIRTUAL_ENV environment variable to the venv path to ensure `uv` uses it correctly. + // Unfortunately there is no way to specify this in the `uv` CLI. + runProcessOptions.env.VIRTUAL_ENV = venvPath; + this.log.info('Installing invokeai package...\r\n'); this.log.info(`> ${uvPath} ${installInvokeArgs.join(' ')}\r\n`);