From 197b7ebe355350e58c71fa7b321797cbfa23b6de Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 13 Dec 2025 02:46:16 +0000 Subject: [PATCH] Fix PEP 668 externally-managed-environment installation errors Co-authored-by: ShaYmez <76499782+ShaYmez@users.noreply.github.com> --- Dockerfile | 4 ++-- README.md | 5 +++++ install.sh | 6 +++--- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index a2d4241..aa840cb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -24,11 +24,11 @@ COPY entrypoint /entrypoint RUN adduser -D -u 54000 radio RUN apk update && \ apk add git gcc musl-dev libffi-dev openssl-dev cargo && \ - pip install --upgrade pip && \ + pip install --upgrade pip --break-system-packages && \ pip cache purge && \ git clone https://github.com/shaymez/HBMonv2.git /hbmon && \ cd /hbmon && \ - pip install --no-cache-dir -r requirements.txt && \ + pip install --no-cache-dir --break-system-packages -r requirements.txt && \ apk del git gcc musl-dev libffi-dev openssl-dev && \ chown -R radio /hbmon diff --git a/README.md b/README.md index ed22fef..69032de 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,11 @@ information and on the subpages, you can see the individual content that was sho HBMonv2 is tested on Debian v10, v11, v12 & v13 +**Note for Debian 12+/Ubuntu 23.04+**: The install.sh script has been updated to handle +PEP 668 externally-managed-environment restrictions. If you encounter any pip installation +errors, the script automatically uses the --break-system-packages flag. For a cleaner +installation, consider using a Python virtual environment. + This version of HBMonv2 requires a web server like apache2, lighttpd and php support running on the server. diff --git a/install.sh b/install.sh index 53f57d0..a0b4d9f 100644 --- a/install.sh +++ b/install.sh @@ -2,6 +2,6 @@ # Install the required support programs apt-get update -apt-get install python3 python3-pip python3-dev libffi-dev libssl-dev cargo sed -y -pip3 install --upgrade setuptools wheel -pip3 install -r requirements.txt +apt-get install python3 python3-pip python3-dev python3-venv libffi-dev libssl-dev cargo sed -y +pip3 install --upgrade setuptools wheel --break-system-packages +pip3 install -r requirements.txt --break-system-packages