mirror of
https://github.com/ChuckBuilds/LEDMatrix.git
synced 2026-04-10 21:03:01 +00:00
fix error in web v2
This commit is contained in:
@@ -25,6 +25,10 @@ source venv_web_v2/bin/activate
|
||||
echo "Installing dependencies..."
|
||||
pip install -r requirements_web_v2.txt
|
||||
|
||||
# Install rgbmatrix module from local source
|
||||
echo "Installing rgbmatrix module..."
|
||||
pip install -e rpi-rgb-led-matrix-master/bindings/python
|
||||
|
||||
# Run the web interface
|
||||
echo "Starting web interface on http://0.0.0.0:5001"
|
||||
python web_interface_v2.py
|
||||
@@ -53,6 +53,18 @@ def main():
|
||||
logger.error(f"Failed to install dependencies: {e}")
|
||||
return
|
||||
|
||||
# Install rgbmatrix module from local source
|
||||
logger.info("Installing rgbmatrix module...")
|
||||
try:
|
||||
rgbmatrix_path = script_dir / 'rpi-rgb-led-matrix-master' / 'bindings' / 'python'
|
||||
subprocess.check_call([
|
||||
str(venv_pip), 'install', '-e', str(rgbmatrix_path)
|
||||
], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
|
||||
logger.info("rgbmatrix module installed successfully")
|
||||
except subprocess.CalledProcessError as e:
|
||||
logger.error(f"Failed to install rgbmatrix module: {e}")
|
||||
return
|
||||
|
||||
# Run the web interface
|
||||
logger.info("Starting web interface on http://0.0.0.0:5001")
|
||||
subprocess.run([str(venv_python), 'web_interface_v2.py'])
|
||||
|
||||
@@ -88,6 +88,19 @@ def check_dependencies(venv_path):
|
||||
logger.error(f"Failed to install dependencies: {e}")
|
||||
return False
|
||||
|
||||
# Install rgbmatrix module from local source
|
||||
logger.info("Installing rgbmatrix module...")
|
||||
try:
|
||||
venv_pip = get_venv_pip(venv_path)
|
||||
rgbmatrix_path = Path(__file__).parent / 'rpi-rgb-led-matrix-master' / 'bindings' / 'python'
|
||||
subprocess.check_call([
|
||||
str(venv_pip), 'install', '-e', str(rgbmatrix_path)
|
||||
], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
|
||||
logger.info("rgbmatrix module installed successfully")
|
||||
except subprocess.CalledProcessError as e:
|
||||
logger.error(f"Failed to install rgbmatrix module: {e}")
|
||||
return False
|
||||
|
||||
return True
|
||||
|
||||
def check_permissions():
|
||||
|
||||
Reference in New Issue
Block a user