File size: 659 Bytes
79580b2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
if (-Not (Test-Path -Path "$PSScriptRoot\venv\Scripts")) {
    Write-Output "Creating venv..."
    python -m venv venv
}

Write-Output "Checked the venv folder. Now installing requirements..."

Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope Process -Force

& "$PSScriptRoot\venv\Scripts\Activate.ps1"

python -m pip install -U pip
pip install -r requirements.txt

if ($LASTEXITCODE -ne 0) {
    Write-Output ""
    Write-Output "Requirements installation failed. Please remove the venv folder and run the script again."
} else {
    Write-Output ""
    Write-Output "Requirements installed successfully."
}

Read-Host -Prompt "Press Enter to continue..."