From caa0ffb55c7db3d2ca91767f5d7fbab43899a654 Mon Sep 17 00:00:00 2001 From: "francisco.garcia" Date: Tue, 3 Mar 2026 08:54:04 -0600 Subject: [PATCH 1/3] Added backtick commented out quotes for pip upgrade steps to avoid path space errors --- installers/win-setup-template.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/installers/win-setup-template.ps1 b/installers/win-setup-template.ps1 index 4f7b5f1e..76c6a2cc 100644 --- a/installers/win-setup-template.ps1 +++ b/installers/win-setup-template.ps1 @@ -138,7 +138,7 @@ New-Item -Path "$PythonArchPath\python3.exe" -ItemType SymbolicLink -Value "$Pyt Write-Host "Install and upgrade Pip" $Env:PIP_ROOT_USER_ACTION = "ignore" $PythonExePath = Join-Path -Path $PythonArchPath -ChildPath "python.exe" -cmd.exe /c "$PythonExePath -m ensurepip && $PythonExePath -m pip install --upgrade --force-reinstall pip --no-warn-script-location" +cmd.exe /c "`"$PythonExePath`" -m ensurepip && `"$PythonExePath`" -m pip install --upgrade --force-reinstall pip --no-warn-script-location" if ($LASTEXITCODE -ne 0) { Throw "Error happened during pip installation / upgrade" } From ae0097e9cbc04deed461ae5f803f4dc801da335d Mon Sep 17 00:00:00 2001 From: "francisco.garcia" Date: Tue, 3 Mar 2026 08:58:25 -0600 Subject: [PATCH 2/3] Added quoted paths for the python installation in the same fashion --- installers/win-setup-template.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/installers/win-setup-template.ps1 b/installers/win-setup-template.ps1 index 76c6a2cc..fad412e3 100644 --- a/installers/win-setup-template.ps1 +++ b/installers/win-setup-template.ps1 @@ -121,7 +121,7 @@ Copy-Item -Path ./$PythonExecName -Destination $PythonArchPath | Out-Null Write-Host "Install Python $Version in $PythonToolcachePath..." $ExecParams = Get-ExecParams -IsMSI $IsMSI -IsFreeThreaded $IsFreeThreaded -PythonArchPath $PythonArchPath -cmd.exe /c "cd $PythonArchPath && call $PythonExecName $ExecParams /quiet" +cmd.exe /c "cd `"$PythonArchPath`" && call `"$PythonExecName`" $ExecParams /quiet" if ($LASTEXITCODE -ne 0) { Throw "Error happened during Python installation" } From 93b884f4b354cc2df61faca0ceb0d9bd7aae5c0d Mon Sep 17 00:00:00 2001 From: "francisco.garcia" Date: Tue, 10 Mar 2026 09:41:50 -0500 Subject: [PATCH 3/3] Added quotes to ArchPath inside the Get-ExecParams function --- installers/win-setup-template.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/installers/win-setup-template.ps1 b/installers/win-setup-template.ps1 index fad412e3..f68fd824 100644 --- a/installers/win-setup-template.ps1 +++ b/installers/win-setup-template.ps1 @@ -62,10 +62,10 @@ function Get-ExecParams { ) if ($IsMSI) { - "TARGETDIR=$PythonArchPath ALLUSERS=1" + "TARGETDIR=`"$PythonArchPath`" ALLUSERS=1" } else { $Include_freethreaded = if ($IsFreeThreaded) { "Include_freethreaded=1" } else { "" } - "DefaultAllUsersTargetDir=$PythonArchPath InstallAllUsers=1 $Include_freethreaded" + "DefaultAllUsersTargetDir=`"$PythonArchPath`" InstallAllUsers=1 $Include_freethreaded" } }