Skip to content
Python

fix: python version check in setup_dev_env.sh and IME Enter key in Composer

Sudhi Seshachala258556c334dd
diff --git a/packaging/setup_dev_env.sh b/packaging/setup_dev_env.sh
index e6693578..847e5c45 100644
--- a/packaging/setup_dev_env.sh
+++ b/packaging/setup_dev_env.sh
@@ -10,7 +10,25 @@ set -euo pipefail
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
VENV="$ROOT/.venv"
-python3 -m venv "$VENV"
+# Find a Python >= 3.10 (macOS system python3 is often 3.9 and too old)
+PYTHON=""
+for candidate in python3.13 python3.12 python3.11 python3.10 python3; do
+ if command -v "$candidate" &>/dev/null; then
+ version=$("$candidate" -c 'import sys; print(sys.version_info >= (3,10))')
+ if [ "$version" = "True" ]; then
+ PYTHON="$candidate"
+ break
+ fi
+ fi
+done
+
+if [ -z "$PYTHON" ]; then
+ echo "Error: Python 3.10+ is required but not found." >&2
+ echo "Install it via: brew install [email protected] (macOS) or your system package manager." >&2
+ exit 1
+fi
+
+"$PYTHON" -m venv "$VENV"
# The coworker package (server, engine, connectors) + inbound-messaging extras.
# aisuite comes in as a regular dependency (git-pinned in pyproject.toml until
# the next PyPI release).