param( [string]$EnvName = "sensor-bench-build-py310", [string]$PythonVersion = "3.10" ) $ErrorActionPreference = "Stop" $RepoRoot = Resolve-Path (Join-Path $PSScriptRoot "..") if (-not (Get-Command conda -ErrorAction SilentlyContinue)) { throw "conda was not found on PATH. Open an Anaconda Prompt or initialize conda for PowerShell." } $envList = conda env list | Out-String if ($envList -notmatch "(?m)^\s*$([regex]::Escape($EnvName))\s") { conda create -y -n $EnvName python=$PythonVersion } conda run -n $EnvName python -m pip install --upgrade pip Push-Location $RepoRoot try { conda run -n $EnvName python -m pip install -e ".[pack]" } finally { Pop-Location } Write-Host "Build environment ready: $EnvName" Write-Host "Orisys will be installed from PyPI by build_exe.ps1."