Skip to content

Commit

Permalink
fix(setup): handle OS-specific venv activation path
Browse files Browse the repository at this point in the history
- Support both Windows and Linux/macOS venv activation
  - Use `.venv/Scripts/activate` for Windows
  - Use `.venv/bin/activate` for Linux/macOS
  • Loading branch information
elharony committed Oct 28, 2024
1 parent 8f734fd commit cfc047e
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion computer-use-demo/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit cfc047e

Please sign in to comment.