罗广辉
12 hours ago 7cc239cee1a9af4e2e8a0f3d5b7a00a074b17214
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
$ErrorActionPreference = "Continue"
 
Write-Host "GeoAI Workbench environment check" -ForegroundColor Cyan
Write-Host ""
 
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 ""
Write-Host "GPU:"
nvidia-smi --query-gpu=name,memory.total,driver_version --format=csv,noheader
if ($LASTEXITCODE -ne 0) {
    Write-Warning "NVIDIA GPU/CUDA is unavailable or cannot be queried. CPU-only demos remain available."
}
 
Write-Host ""
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."
}