From cfc047e1e2097f78b97558b396df4560f54c4f8e Mon Sep 17 00:00:00 2001 From: Yahya Elharony Date: Tue, 29 Oct 2024 02:33:14 +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 | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/computer-use-demo/setup.sh b/computer-use-demo/setup.sh index bd966cae..5bdc1d07 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 +# Create virtual environment python3 -m venv .venv -source .venv/bin/activate + +# 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