Skip to content

Commit 3d63bb1

Browse files
committed
Fix virtual environment activation path on Windows
The setup.sh script was hardcoded to use .venv/bin/activate, which fails on Windows where Python creates .venv/Scripts/activate instead. This adds an OSTYPE check to select the correct path on msys/cygwin shells while preserving the existing behavior on Linux and macOS. Fixes #129
1 parent 4b2549e commit 3d63bb1

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

computer-use-demo/setup.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,11 @@ if ! command -v cargo &> /dev/null; then
1515
fi
1616

1717
python3 -m venv .venv
18-
source .venv/bin/activate
18+
if [[ "$OSTYPE" == "msys" || "$OSTYPE" == "cygwin" || "$OSTYPE" == "win32" ]]; then
19+
source .venv/Scripts/activate
20+
else
21+
source .venv/bin/activate
22+
fi
1923
pip install --upgrade pip
2024
pip install -r dev-requirements.txt
2125
pre-commit install

0 commit comments

Comments
 (0)