fix(erpnext): bootstrap pip in uv venv for ansible install

bench setup production internally runs:
  sudo <uv-venv-python> -m pip install ansible
but uv tool environments don't include pip by default.

Fix: run ensurepip + pip install ansible before bench setup
production to satisfy the dependency.
This commit is contained in:
CanbiZ (MickLesk)
2026-03-25 15:38:18 +01:00
parent 1e9311e67f
commit d817b4326c

View File

@@ -82,6 +82,9 @@ $STD systemctl enable --now redis-server
msg_ok "Configured ERPNext"
msg_info "Setting up Production"
BENCH_VENV="/home/frappe/.local/share/uv/tools/frappe-bench"
$STD "${BENCH_VENV}/bin/python" -m ensurepip
$STD "${BENCH_VENV}/bin/python" -m pip install ansible
$STD bash -c 'export PATH="/home/frappe/.local/bin:$PATH"; cd /opt/frappe-bench && bench setup production frappe --yes'
$STD systemctl enable --now supervisor
msg_ok "Set up Production"