fix: handle PEP 668 externally-managed-environment on Raspberry Pi OS

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-18 05:49:33 +00:00
parent bdda1ca6ba
commit c09a071103

View File

@@ -40,12 +40,21 @@ echo " ✓ System deps installed"
# ─── 2. Python deps ──────────────────────────────────────────────────
echo "→ Installing Python packages..."
# Try system packages first (faster, no compilation needed)
apt-get install -y -qq \
python3-flask python3-psycopg2 python3-sqlalchemy \
python3-jwt python3-bcrypt python3-requests \
gunicorn 2>/dev/null || true
# Install remaining packages with --break-system-packages (safe for a dedicated server)
pip3 install --break-system-packages --quiet \
flask psycopg2-binary sqlalchemy pyjwt bcrypt requests \
gunicorn faster-whisper \
2>/dev/null || pip3 install --quiet \
flask psycopg2-binary sqlalchemy pyjwt bcrypt requests \
gunicorn faster-whisper
2>/dev/null || \
pip3 install --break-system-packages --force-reinstall --quiet \
flask psycopg2-binary sqlalchemy PyJWT bcrypt requests \
gunicorn \
2>/dev/null || true
echo " ✓ Python packages installed"