From f939a67d06f3ee8d884607c67ace65a4e1f1db1e Mon Sep 17 00:00:00 2001 From: Yahya Elharony Date: Tue, 29 Oct 2024 02:25:46 +0300 Subject: [PATCH] fix(setup): handle OS-specific venv activation path - Support both Windows and Linux/macOS venv activation - Use `.venv/Scripts/activate` for Windows - Use `.venv/bin/activate` for Linux/macOS --- computer-use-demo/setup.sh | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/computer-use-demo/setup.sh b/computer-use-demo/setup.sh index bd966cae..3bcd40db 100755 --- a/computer-use-demo/setup.sh +++ b/computer-use-demo/setup.sh @@ -14,8 +14,16 @@ if ! command -v cargo &> /dev/null; then exit 1 fi -python3 -m venv .venv -source .venv/bin/activate +# Create virtual environment +python -m venv .venv + +# Use the appropriate activation script for the OS +if [[ "$OSTYPE" == "msys" || "$OSTYPE" == "win32" ]]; then + source .venv/Scripts/activate # Windows activation path +else + source .venv/bin/activate # Linux/macOS activation path +fi + pip install --upgrade pip pip install -r dev-requirements.txt pre-commit install