On macOS with Homebrew Python, `Path(sys.executable).resolve()` follows
the venv symlink back to the system interpreter. PEP 668 then blocks
pip installs with "externally-managed-environment", causing the setup
tour to fail.
Swap the check order so the unresolved venv path is preferred when it
exists, falling back to the resolved path only when necessary.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add _get_npm_command() helper to resolve npm path on Windows
- Use shell=True in _run_cmd() on Windows to support .cmd files
- Fix FileNotFoundError when running npm install on Windows
This fixes the issue where shutil.which('npm') fails to find npm.cmd
on Windows, causing the setup tour to fail during dependency installation.