fix: handle cross-platform venv compatibility in WSL

Changes:
- start_ui.sh, start.sh: Check for venv/bin/activate instead of just
  venv/ directory to detect Windows venvs in Linux/WSL
- Auto-recreate venv when incompatible platform structure detected
- Add error handling for venv removal, creation, and activation failures
- Provide actionable error messages with distro-specific instructions
- start_ui.bat: Check for venv\Scripts\activate.bat for consistency
  with start.bat pattern

Fixes issue where users cloning repo in WSL would encounter:
- "venv/bin/activate: No such file or directory"
- "No module named pip" errors

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Auto
2026-01-10 09:51:54 +02:00
parent a195d6de08
commit dff28c53bf
3 changed files with 58 additions and 8 deletions

View File

@@ -18,8 +18,8 @@ if %ERRORLEVEL% neq 0 (
exit /b 1
)
REM Check if venv exists, create if not
if not exist "venv" (
REM Check if venv exists with correct activation script
if not exist "venv\Scripts\activate.bat" (
echo Creating virtual environment...
python -m venv venv
)