From 3f6fa5ba282f567689679c1a0a9f43187acc9f75 Mon Sep 17 00:00:00 2001 From: Smittix Date: Fri, 27 Feb 2026 10:50:16 +0000 Subject: [PATCH] fix: use project venv pip for radiosonde_auto_rx install Avoids PEP 668 externally-managed-environment error on Debian Bookworm by using the project's venv/bin/pip instead of system pip3. Co-Authored-By: Claude Opus 4.6 --- setup.sh | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/setup.sh b/setup.sh index e60fd77..d864f19 100755 --- a/setup.sh +++ b/setup.sh @@ -820,6 +820,7 @@ WRAPPER install_radiosonde_auto_rx() { info "Installing radiosonde_auto_rx (weather balloon decoder)..." local install_dir="/opt/radiosonde_auto_rx" + local project_dir="$(pwd)" ( tmp_dir="$(mktemp -d)" @@ -833,10 +834,19 @@ install_radiosonde_auto_rx() { info "Installing Python dependencies..." cd "$tmp_dir/radiosonde_auto_rx/auto_rx" - pip3 install --quiet -r requirements.txt || { - warn "Failed to install radiosonde_auto_rx Python dependencies" - exit 1 - } + # Use project venv pip to avoid PEP 668 externally-managed-environment errors + if [ -x "$project_dir/venv/bin/pip" ]; then + "$project_dir/venv/bin/pip" install --quiet -r requirements.txt || { + warn "Failed to install radiosonde_auto_rx Python dependencies" + exit 1 + } + else + pip3 install --quiet --break-system-packages -r requirements.txt 2>/dev/null \ + || pip3 install --quiet -r requirements.txt || { + warn "Failed to install radiosonde_auto_rx Python dependencies" + exit 1 + } + fi info "Installing to ${install_dir}..." refresh_sudo