Skip to content

bug: _start_process() uses bare 'python' command — fails on macOS with python.org installer (exit code 127) #221

@AlanAAG

Description

@AlanAAG

Environment

  • macOS (12.3+)
  • Python 3.13 installed via python.org official installer
  • Living UI: Research Board (marketplace)

Symptom

Launch fails at backend.health with:

Backend process exited with code 127
/bin/sh: python: command not found

Root Cause

_start_process() spawns the backend using the raw manifest start command:
python -m uvicorn main:app --host 0.0.0.0 --port ...

This is passed to /bin/sh which has no python alias on macOS 12.3+
when Python was installed via the official python.org .pkg installer
(which installs python3 only, no python symlink).

Teammates using Homebrew/pyenv/conda are unaffected because those
installers create the pythonpython3 alias automatically.

Note: this is unrelated to the SSL fix in v1.3.0 — the marketplace
download succeeds fine. The failure is at server launch time.

Proposed Fix

In _start_process(), normalize the command before spawning:

import sys

def _resolve_python_command(self, command: str) -> str:
if command.startswith("python ") or command == "python":
return command.replace("python", sys.executable, 1)
return command

Call this before Popen. sys.executable always points to the exact
interpreter running CraftBot — no PATH dependency, works on all platforms.

Workaround (until fixed)

sudo ln -s $(which python3) /usr/local/bin/python

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions