diff --git a/install.py b/install.py index 1e1adf0..5ecaa71 100755 --- a/install.py +++ b/install.py @@ -117,6 +117,12 @@ def setup_venv(dry_run=False): # Always (re-)install requirements so updates are picked up if not dry_run: + # Bootstrap pip if the venv was created without it (common on Arch) + code, _, _ = run_quiet([str(VENV_PYTHON), "-m", "pip", "--version"]) + if code != 0: + info("pip not found in venv — bootstrapping via ensurepip …") + run([str(VENV_PYTHON), "-m", "ensurepip", "--upgrade"]) + info("Installing / updating requirements …") run([str(VENV_PYTHON), "-m", "pip", "install", "--quiet", "--upgrade", "pip"]) run([str(VENV_PYTHON), "-m", "pip", "install", "--quiet", "-r", str(REQUIREMENTS)])