Skip to content

fix(setup): use Windows venv path on Windows shells#398

Closed
MukundaKatta wants to merge 1 commit intoanthropics:mainfrom
MukundaKatta:fix/windows-venv-activation
Closed

fix(setup): use Windows venv path on Windows shells#398
MukundaKatta wants to merge 1 commit intoanthropics:mainfrom
MukundaKatta:fix/windows-venv-activation

Conversation

@MukundaKatta
Copy link
Copy Markdown

Why

Closes #129.

On Windows under Git Bash / MinGW / Cygwin, Python's venv puts the activation script at .venv/Scripts/activate, not .venv/bin/activate. The current computer-use-demo/setup.sh hardcodes the Linux/Mac path, so Windows users get a No such file or directory error on line 18.

What

Detect Windows shells via $OSTYPE (msys, win32, cygwin) and source the correct activation path. Linux/macOS behavior is unchanged.

Tested

  • Bash on macOS — still sources .venv/bin/activate (else branch).
  • The if branch was not executed on a real Windows host as part of this change; the maintainer may want to confirm on Git Bash / MSYS2 before merging. The condition matches the pattern proposed in the issue and is widely used in cross-platform shell scripts.

The setup script previously hardcoded .venv/bin/activate which fails on
Git Bash / MinGW / Cygwin where the activation script is at
.venv/Scripts/activate. Detect via $OSTYPE and pick the right path.

Closes anthropics#129
@MukundaKatta
Copy link
Copy Markdown
Author

Closing this in deference to the older PRs targeting the same issue (#130, #333, #393). Happy to revisit if maintainers prefer this approach.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

1 participant