diff --git a/src/utils/setup/setupPipPack.ts b/src/utils/setup/setupPipPack.ts index f3c3e569..a2f55f9d 100644 --- a/src/utils/setup/setupPipPack.ts +++ b/src/utils/setup/setupPipPack.ts @@ -20,13 +20,15 @@ export async function setupPipPackWithPython( name: string, version?: string, upgrade = false, + user = true, ): Promise { info(`Installing ${name} ${version ?? ""} via pip`) const nameAndVersion = version !== undefined && version !== "" ? `${name}==${version}` : name const upgradeFlag = upgrade === true ? ["--upgrade"] : [] + const userFlag = user === true ? ["--user"] : [] - execaSync(givenPython, ["-m", "pip", "install", ...upgradeFlag, nameAndVersion], { + execaSync(givenPython, ["-m", "pip", "install", ...upgradeFlag, ...userFlag, nameAndVersion], { stdio: "inherit", })