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"