# Setup Script - Create venv and install dependencies Write-Host "šŸ”§ Setting up virtual environment..." -ForegroundColor Cyan Write-Host "" # Step 1: Create venv Write-Host "Step 1: Creating virtual environment..." -ForegroundColor Yellow python -m venv venv if ($LASTEXITCODE -ne 0) { Write-Host "āŒ Failed to create virtual environment" -ForegroundColor Red exit 1 } Write-Host "āœ… Virtual environment created" -ForegroundColor Green # Step 2: Activate venv Write-Host "`nStep 2: Activating virtual environment..." -ForegroundColor Yellow & .\venv\Scripts\Activate.ps1 if ($LASTEXITCODE -ne 0) { Write-Host "āš ļø Execution policy error. Running fix..." -ForegroundColor Yellow Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser -Force & .\venv\Scripts\Activate.ps1 } Write-Host "āœ… Virtual environment activated" -ForegroundColor Green # Step 3: Upgrade pip Write-Host "`nStep 3: Upgrading pip..." -ForegroundColor Yellow python -m pip install --upgrade pip # Step 4: Install dependencies Write-Host "`nStep 4: Installing dependencies from requirements.txt..." -ForegroundColor Yellow Write-Host "ā±ļø This may take 5-10 minutes..." -ForegroundColor Cyan pip install -r requirements.txt if ($LASTEXITCODE -eq 0) { Write-Host "`nāœ… Setup complete!" -ForegroundColor Green Write-Host "" Write-Host "šŸŽ‰ You're ready to run the app!" -ForegroundColor Cyan Write-Host "" Write-Host "Next steps:" -ForegroundColor Yellow Write-Host " 1. Test locally: python app.py" -ForegroundColor White Write-Host " 2. Deploy: .\deploy.ps1" -ForegroundColor White Write-Host "" } else { Write-Host "`nāŒ Installation failed" -ForegroundColor Red Write-Host "Check the error messages above" -ForegroundColor Yellow }