From 643a7979694e63d60e3069bf07c05df33ced4df7 Mon Sep 17 00:00:00 2001 From: LeoBorcherding Date: Mon, 11 May 2026 01:59:14 -0500 Subject: [PATCH] fix(install.ps1): recreate venv with Python 3.12 after ROCm switch Venv was created with 3.13 before GPU detection ran; switching $DetectedPython to 3.12 had no effect since $VenvPython still pointed to the 3.13 interpreter inside the already-created venv. --- install.ps1 | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/install.ps1 b/install.ps1 index 424c3d5857..1d8ffb8040 100644 --- a/install.ps1 +++ b/install.ps1 @@ -1338,6 +1338,16 @@ shell.Run cmd, 0, False if ($py312) { $DetectedPython = $py312 substep "AMD GPU detected -- switching to Python 3.12 (ROCm wheels are cp312-only)" "Cyan" + # Recreate the venv with Python 3.12 (it was just created with 3.13 above). + if (Test-Path -LiteralPath $VenvDir) { + Remove-Item -LiteralPath $VenvDir -Recurse -Force -ErrorAction SilentlyContinue + } + step "venv" "creating Python 3.12 virtual environment" + substep "$VenvDir" + $venvExit = Invoke-InstallCommand { uv venv $VenvDir --python "$($DetectedPython.Path)" } + if ($venvExit -ne 0) { + return (Exit-InstallFailure "Failed to create Python 3.12 virtual environment (exit code $venvExit)" $venvExit) + } } else { substep "AMD GPU detected but Python 3.12 not found -- ROCm GPU support requires Python 3.12" "Yellow" substep "Install Python 3.12 from python.org and re-run." "Yellow"