diff --git a/deployment/windows/scripts/ROA2WEB-Console.ps1 b/deployment/windows/scripts/ROA2WEB-Console.ps1 index f0df456..b203ab5 100644 --- a/deployment/windows/scripts/ROA2WEB-Console.ps1 +++ b/deployment/windows/scripts/ROA2WEB-Console.ps1 @@ -570,12 +570,14 @@ function Install-BackendFirstTime { & python -m venv $venvPath Write-Success "Virtual environment created at: $venvPath" - # Install dependencies - Write-Step "Installing Python dependencies..." + # Define paths (BEFORE installing dependencies) $pipPath = Join-Path $venvPath "Scripts\pip.exe" $pythonPath = Join-Path $venvPath "Scripts\python.exe" $requirementsPath = Join-Path $Config.BackendPath "requirements.txt" + # Install dependencies + Write-Step "Installing Python dependencies..." + if (Test-Path $requirementsPath) { Write-Info "Upgrading pip..." & $pythonPath -m pip install --upgrade pip | Out-Default @@ -768,12 +770,14 @@ function Install-TelegramBotFirstTime { & python -m venv $venvPath Write-Success "Virtual environment created" - # Install dependencies - Write-Step "Installing Python dependencies..." + # Define paths (BEFORE installing dependencies) $pipPath = Join-Path $venvPath "Scripts\pip.exe" $pythonPath = Join-Path $venvPath "Scripts\python.exe" $requirementsPath = Join-Path $Config.TelegramBotPath "requirements.txt" + # Install dependencies + Write-Step "Installing Python dependencies..." + if (Test-Path $requirementsPath) { Write-Info "Upgrading pip..." & $pythonPath -m pip install --upgrade pip | Out-Default