Inconsistent Virtual Environment Activation Path for Windows in `setup.sh` Script

Author: elharonyCreated Oct 28, 2024Updated May 9, 2026
Labelsbuggood first issuecomputer usewindows

Description:

The current setup.sh script uses the default activation path .venv/bin/activate for virtual environments, which works on Linux and macOS systems. However, on Windows, the correct path for activating the virtual environment is .venv/Scripts/activate. This discrepancy causes the script to fail when trying to activate the virtual environment on Windows machines.

Steps to Reproduce:

  1. Clone the repository and navigate to the project directory on a Windows machine.
  2. Run ./setup.sh.
  3. The script will attempt to activate the virtual environment using .venv/bin/activate, resulting in an error:
bash
./setup.sh: line 18: .venv/bin/activate: No such file or directory

Expected Behavior:

The virtual environment should be activated using the correct path on both Windows (.venv/Scripts/activate) and Linux/macOS (.venv/bin/activate).

Proposed Solution:

Add an OS check within the setup.sh script to determine the appropriate activation path based on the user's operating system:

bash
if [[ "$OSTYPE" == "msys" || "$OSTYPE" == "win32" ]]; then
 source .venv/Scripts/activate  # Windows activation path
else
 source .venv/bin/activate  # Linux/macOS activation path
fi

Source: anthropics/claude-quickstarts