`runtime.python` fails with "command not found: python" on a default VM (0.2.21, 0.2.22); Pyodide-distribution packages don't install
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
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-core0.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")returns42.process.execFile("python3", ["-c", ...])works (Python 3.13.2).python3through 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
- Is the missing Python command registration a known regression, and is a release with the fix planned?
- 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
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di rivet-dev/agentos
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
rivet-dev/agentos#2042 · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
Python edits to filesystem.writeFile-created files are reverted by shadow reconciliationForse già presa @ankssjain l’ha presa 9 giorni fa. Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 20/100
rivet-dev/agentos#2022 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 3/5 Mezza giornata Idoneità per principianti 32/100
rivet-dev/agentos#2020 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 66/100
rivet-dev/agentos#1994 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di rivet-dev/agentos
Issue simili
-
agent:triaged bug bughunt pm:bundler priority:p1
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
SocketDev/socket-patch#1573 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
rustix::termios::Termios::OutputModes does not expost some const e.g. OLCUC for musl and macOSAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
bytecodealliance/rustix#1706 · 1 commento ·
I maintainer di solito rispondono entro 11 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
wormhole-foundation/wormhole#5062 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno