# Check for python3 or python
if (Get-Command "python3") {
    $python = "python3"
}
else {
    $python = "python"
}

# Check if .venv directory exists
if (-Not (Test-Path "./.venv")) {
    & $python -m venv .venv
}

# Activate the virtual environment
. ./.venv/bin/Activate.ps1

# Install required packages
& $python -m pip install --upgrade pip
& $python -m pip install -r client/requirements.txt