From a1cdce49ff9920b4fced3da3662b7b3da7540f10 Mon Sep 17 00:00:00 2001 From: shivanathd Date: Mon, 5 Jan 2026 23:18:33 +0530 Subject: [PATCH] fix: auto-activate venv in start_ui.sh The start_ui.sh script was not activating the virtual environment, causing ModuleNotFoundError for dependencies like python-dotenv. This fix adds venv detection and activation logic (matching start.sh) so users can run ./start_ui.sh directly after setting up the venv. --- start_ui.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) mode change 100644 => 100755 start_ui.sh diff --git a/start_ui.sh b/start_ui.sh old mode 100644 new mode 100755 index 317d7448..92a56a45 --- a/start_ui.sh +++ b/start_ui.sh @@ -11,8 +11,12 @@ echo "" # Get the directory where this script is located SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +# Use virtual environment if it exists +if [ -f "$SCRIPT_DIR/venv/bin/activate" ]; then + source "$SCRIPT_DIR/venv/bin/activate" + PYTHON_CMD="python" # Check if Python is available -if ! command -v python3 &> /dev/null; then +elif ! command -v python3 &> /dev/null; then if ! command -v python &> /dev/null; then echo "ERROR: Python not found" echo "Please install Python from https://python.org"