Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

`runtime.python` fails with "command not found: python" on a default VM (0.2.21, 0.2.22); Pyodide-distribution packages don't install

Aperta
#2,027 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
18/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
javascript, python, rust, wasm
Ambito
backend, tooling

Direzione di ricerca

Start from the repro in the issue: AgentOs.create() then runtime.python.evaluate("21 * 2"), which fails with ENOENT: command not found: python. The issue points at command registration in configureVm versus createVm, the bootstrapCommands workaround from #2012, and the /__agentos_pyodide/ wheel path. Pull request #2028 is already open against this, so coordinate with it before starting. Done means python.evaluate returns 42 on a default VM and the Pyodide-distribution packages install.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Problem

The minimal example from the Python docs fails on the published 0.2.21 and 0.2.22 packages:

import { AgentOs } from "@rivet-dev/agentos-core";

const runtime = await AgentOs.create();
try {
  const result = await runtime.python.evaluate("21 * 2");
  console.log(result.outcome === "succeeded" ? result.value : result.error);
} finally {
  await runtime.dispose();
}

Expected: 42. Actual:

{ code: 'execution_start_failed', name: 'ExecutionError', message: 'ENOENT: command not found: python' }

python.execute and python.install return the same error. Adding permissions: { network: "allow" } makes no difference.

From the guest shell, python3 -c "raise SystemExit(7)" exits 0 and prints nothing. The /bin/python3 stub runs as a silent no-op, so callers that check exit codes think the script succeeded.

This looks like the command-registration problem mentioned in passing in #2012 ("configureVm currently omits the runtime commands registered by createVm"). I couldn't find an issue tracking it on its own. #1881 shows python3 working with a plain AgentOs.create({}) on 0.2.15, so it seems to be a regression.

Environment
  • @rivet-dev/agentos-core 0.2.21 and 0.2.22, installed from npm
  • Node.js 24.21.0
  • Linux x64 (glibc, Debian bookworm, kernel 6.8) and macOS x64 (darwin-x64 sidecar): the same result on both
With the #2012 workaround

Adding python/python3 to bootstrapCommands through a SidecarProcess.prototype.configureVm patch, as in #2012, gets Python running:

  • python.evaluate("21 * 2") returns 42.
  • process.execFile("python3", ["-c", ...]) works (Python 3.13.2).
  • python3 through the guest shell times out. That's #2012, which I understand is fixed on main.

Package installs, with network: "allow" (tested on macOS x64, 0.2.22):

python.install([...]) Result
pypdf succeeded, 16 s
openpyxl succeeded, 42 s
pandas timed out after 300 s; import pandas then fails on missing six
pandas, openpyxl, python-docx, python-pptx, pypdf failed: Failed to load Pillow, lxml, typing-extensions / ENOENT: no such file or directory, open '/__agentos_pyodide/pillow-11.3.0-cp313-cp313-pyodide_2025_0_wasm32.whl' (the same for typing_extensions), then Script execution exceeded the CPU-time budget (limits.jsRuntime.cpuTimeLimitMs)

Pure-Python wheels from PyPI install. Packages that come from the Pyodide distribution (pandas, Pillow, lxml, typing-extensions) don't: their wheels aren't present under /__agentos_pyodide/, and they aren't fetched instead.

Questions
  1. Is the missing Python command registration a known regression, and is a release with the fix planned?
  2. How are Pyodide-distribution packages supposed to be provided: bundled, fetched from a CDN, or configured through AGENTOS_PYODIDE_PACKAGE_BASE_URL / AGENTOS_PYODIDE_INDEX_URL? Is pandas expected to work out of the box, given it's on the preload allowlist?

Happy to rerun this on a release candidate.

Lingua principale
Rust
Stelle
4.7k
Fork
263
Merge medio
7h 36m
PR unite (30g)
38

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di rivet-dev/agentos

Tutte le issue di rivet-dev/agentos

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.