fix(install): resolve install issues and speed up web UI startup (#225)

* fix(install): exclude rpi-rgb-led-matrix from permission normalization

The permission normalization step in first_time_install.sh was running
chmod 644 on all files, which stripped executable bits from compiled
library files (librgbmatrix.so.1) after make build-python created them.

This caused LED panels to not work after fresh installation until users
manually ran chmod on the rpi-rgb-led-matrix-master directory.

Fixes #224

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix(install): resolve install script issues and speed up web UI startup

Issues addressed:
- Remove redundant python3-pillow from apt (Debian maps it to python3-pil)
- Only upgrade pip, not setuptools/wheel (they conflict with apt versions)
- Remove separate apt numpy install (pip handles it from requirements.txt)
- Install web interface deps during first-time setup, not on every startup
- Add marker file (.web_deps_installed) to skip redundant pip installs
- Add user-friendly message about wait time after installation

The web UI was taking 30-60+ seconds to start because it ran pip install
on every startup. Now it only installs dependencies on first run.

Fixes #208

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix(install): prevent duplicate web dependency installation

Step 7 was installing web dependencies again even though they were
already installed in Step 5. Now Step 7 checks for the .web_deps_installed
marker file and skips the installation if it already exists.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix(install): only create web deps marker on successful install

The .web_deps_installed marker file should only be created when pip
install actually succeeds. Previously it was created regardless of
the pip exit status, which could cause subsequent runs to skip
installing missing dependencies.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Chuck <chuck@example.com>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Chuck
2026-01-30 12:08:57 -05:00
committed by GitHub
parent 8fb2800495
commit ea61331d46
2 changed files with 78 additions and 45 deletions

View File

@@ -8,6 +8,13 @@ from pathlib import Path
PROJECT_DIR = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
CONFIG_FILE = os.path.join(PROJECT_DIR, 'config', 'config.json')
WEB_INTERFACE_SCRIPT = os.path.join(PROJECT_DIR, 'web_interface', 'start.py')
# Marker file created by first_time_install.sh to indicate dependencies are installed
DEPS_MARKER = os.path.join(PROJECT_DIR, '.web_deps_installed')
def dependencies_installed():
"""Check if dependencies were installed during first-time setup."""
return os.path.exists(DEPS_MARKER)
def install_dependencies():
"""Install required dependencies using system Python."""
@@ -85,11 +92,18 @@ def main():
if is_enabled:
print("Configuration 'web_display_autostart' is enabled. Starting web interface...")
# Install dependencies
if not install_dependencies():
print("Failed to install dependencies. Exiting.")
sys.exit(1)
# Only install dependencies if not already done during first-time setup
if not dependencies_installed():
print("First run detected: Installing dependencies...")
if not install_dependencies():
print("Failed to install dependencies. Exiting.")
sys.exit(1)
# Create marker file after successful install
Path(DEPS_MARKER).touch()
print("Dependencies installed and marker file created.")
else:
print("Dependencies already installed (marker file found). Skipping installation.")
try:
# Replace the current process with web_interface.py using system Python