| | |
| | | Write-Host "Python installations:" |
| | | py -0p |
| | | |
| | | $PythonCandidates = @( |
| | | (Join-Path $env:LOCALAPPDATA "Programs/Python/Python312/python.exe"), |
| | | (Join-Path $env:LOCALAPPDATA "Programs/Python/Python311/python.exe"), |
| | | (Join-Path $env:ProgramFiles "Python312/python.exe"), |
| | | (Join-Path $env:ProgramFiles "Python311/python.exe") |
| | | ) |
| | | $SupportedPython = $PythonCandidates | Where-Object { Test-Path $_ } | Select-Object -First 1 |
| | | |
| | | Write-Host "" |
| | | Write-Host "Node:" |
| | | node --version |
| | |
| | | } |
| | | |
| | | Write-Host "" |
| | | if ((py -0p | Select-String "3.11|3.12")) { |
| | | if ($SupportedPython) { |
| | | Write-Host "Detected: $(& $SupportedPython --version) at $SupportedPython" |
| | | Write-Host "Python version: ready" -ForegroundColor Green |
| | | } else { |
| | | Write-Warning "Install Python 3.11 or 3.12 before running setup.ps1." |