Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions Windows/Components/Core/uninstall_conda.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ $possibleCondaPaths = @(
"$env:USERPROFILE\anaconda3",
"$env:ProgramData\miniforge3",
"$env:ProgramData\miniconda3",
"$env:ProgramData\anaconda3"
"$env:ProgramData\anaconda3",
"C:\DTUApps\miniforge3"
)

foreach ($path in $possibleCondaPaths) {
Expand Down Expand Up @@ -338,4 +339,4 @@ if ($useNativeDialogs) {
Write-Host ""
}

Write-Host "You can now reinstall conda if needed." -ForegroundColor Green
Write-Host "You can now reinstall conda if needed." -ForegroundColor Green
11 changes: 7 additions & 4 deletions Windows/Components/Diagnostics/generate_report.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ function Refresh-Environment {
"$env:USERPROFILE\miniforge3",
"$env:USERPROFILE\miniforge3\Scripts",
"$env:USERPROFILE\miniforge3\Library\bin",
"C:\DTUApps\miniforge3",
"C:\DTUApps\miniforge3\Scripts",
"C:\DTUApps\miniforge3\Library\bin",
"$env:LOCALAPPDATA\Programs\Microsoft VS Code\bin",
"${env:ProgramFiles}\Microsoft VS Code\bin",
"${env:ProgramFiles(x86)}\Microsoft VS Code\bin"
Expand Down Expand Up @@ -50,7 +53,7 @@ function Get-SystemInfo {
$pythonVersion = $null

# First try to find conda Python specifically
$condaPythonPath = "$env:USERPROFILE\miniforge3\python.exe"
$condaPythonPath = "C:\DTUApps\miniforge3\python.exe"
if (Test-Path $condaPythonPath) {
Write-Host " Found conda Python at: $condaPythonPath" -ForegroundColor Gray
$pythonPath = $condaPythonPath
Expand Down Expand Up @@ -181,7 +184,7 @@ function Test-FirstYearSetup {

# Test 1: Miniforge Installation
Write-Output "Testing Miniforge Installation..."
$miniforgePath = "$env:USERPROFILE\miniforge3"
$miniforgePath = "C:\DTUApps\miniforge3"
if ((Test-Path $miniforgePath) -and ($SystemInfo.CondaPath)) {
Write-Output "PASS: Miniforge installed at $miniforgePath"
} else {
Expand Down Expand Up @@ -212,8 +215,8 @@ function Test-FirstYearSetup {
Write-Output "Testing DTU Packages..."

# Try to use conda Python with environment activation
$condaPythonPath = "$env:USERPROFILE\miniforge3\python.exe"
$condaScriptsPath = "$env:USERPROFILE\miniforge3\Scripts"
$condaPythonPath = "C:\DTUApps\miniforge3\python.exe"
$condaScriptsPath = "C:\DTUApps\miniforge3\Scripts"

if (Test-Path $condaPythonPath) {
# Use conda Python directly
Expand Down
9 changes: 5 additions & 4 deletions Windows/Components/Python/install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ $condaPaths = @(
"$env:USERPROFILE\anaconda3\Scripts\conda.exe",
"$env:ProgramData\miniforge3\Scripts\conda.exe",
"$env:ProgramData\miniconda3\Scripts\conda.exe",
"$env:ProgramData\anaconda3\Scripts\conda.exe"
"$env:ProgramData\anaconda3\Scripts\conda.exe",
"C:\DTUApps\miniforge3\Scripts\conda.exe"
)

$condaFound = $false
Expand Down Expand Up @@ -93,9 +94,9 @@ if (-not $condaFound) {
# Install Miniforge silently
Write-Host "Installing Miniforge..."
Write-Host "Installer path: $installerPath"
Write-Host "Installation directory: $env:USERPROFILE\miniforge3"
Write-Host "Installation directory: C:\DTUApps\miniforge3"
try {
$process = Start-Process -FilePath $installerPath -ArgumentList "/S /D=$env:USERPROFILE\miniforge3" -Wait -PassThru
$process = Start-Process -FilePath $installerPath -ArgumentList "/S /D=C:\DTUApps\miniforge3" -Wait -PassThru
if ($process.ExitCode -ne 0) {
Write-Host "Miniforge installation failed with exit code: $($process.ExitCode)"
throw "Miniforge installation failed"
Expand All @@ -113,7 +114,7 @@ if (-not $condaFound) {
}

# Add Miniforge to PATH
$miniforgePath = "$env:USERPROFILE\miniforge3\Scripts"
$miniforgePath = "C:\DTUApps\miniforge3\Scripts"
$currentPath = [Environment]::GetEnvironmentVariable("PATH", "User")
if ($currentPath -notlike "*$miniforgePath*") {
$newPath = "$currentPath;$miniforgePath"
Expand Down