From 3df6a8d29a4b96bfa198ef6033130500d6933f32 Mon Sep 17 00:00:00 2001 From: Igor Tarasenko Date: Thu, 7 May 2026 15:01:57 +0200 Subject: [PATCH] fix(bootstrap): create local .venv with symlinks=True MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Without symlinks=True, mise/asdf shared-library Python builds on macOS default venv to copy mode. The copied python3 binary still references @executable_path/../lib/libpython3.X.dylib in its load command, but the dylib is never copied into .venv/lib — so any import in the new venv (starting with ensurepip) aborts with SIGABRT. Reproduces with mise's cpython 3.13.9 build: [bootstrap] Creating local virtualenv at .../.venv [bootstrap] ERROR: Command '[".../.venv/bin/python3.13", "-m", "ensurepip", "--upgrade", "--default-pip"]' died with . Symlinking the interpreter keeps @executable_path resolving back to the original install where libpython lives. uv-managed Pythons already symlink by default; mise's do not. --- bootstrap.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/bootstrap.py b/bootstrap.py index 32393fd1..3dfcd05e 100644 --- a/bootstrap.py +++ b/bootstrap.py @@ -179,7 +179,13 @@ def ensure_python_has_webui_deps(python_exe: str, agent_dir: Path | None = None) ) if not venv_python.exists(): info(f"Creating local virtualenv at {venv_dir}") - venv.EnvBuilder(with_pip=True).create(venv_dir) + # symlinks=True: some Python builds (notably mise/asdf shared-library + # installs on macOS) default venv to copy mode. The copied binary still + # uses @executable_path/../lib/libpython3.X.dylib for its load command, + # so the venv binary aborts with SIGABRT on first import because the + # dylib never gets copied into .venv/lib. Symlinking the interpreter + # keeps @executable_path resolving back to the original install. + venv.EnvBuilder(with_pip=True, symlinks=True).create(venv_dir) info("Installing WebUI dependencies into local virtualenv") subprocess.run(