KEMBAR78
Python WASM-WASI can't be executed from a different directory than root · Issue #100307 · python/cpython · GitHub
Skip to content

Python WASM-WASI can't be executed from a different directory than root #100307

@dbaeumer

Description

@dbaeumer

Bug report

  • install wasmtime (I used 3.0.1)
  • download Python-3.11.0-wasm32-wasi-16.zip
  • extract it into a directory
  • cd into that directory
  • run python using the following command line wasmtime run --mapdir /::. ./python.wasm
    Observe: everything works as expected. You end up in a REPL
  • try to 'mount' the python installation into a different directory (e.g. /usr) by running wasmtime run --mapdir /usr::. --env PYTHONHOME=/usr/lib/python3.11 ./python.wasm
    Observe: you get
Exception ignored error evaluating path:
Traceback (most recent call last):
  File "<frozen getpath>", line 471, in <module>
OSError: [Errno 76] Capabilities insufficient
Fatal Python error: error evaluating path
Python runtime state: core initialized

Current thread 0x00000000 (most recent call first):
  <no Python frame>

I was not able to successfully execute Python when mounting the installation directory to something different than /

Your environment

  • wasmtime 3.0.1
  • Python-3.11.0-wasm32-wasi-16.zip
  • WSL2 running 5.15.79.1-microsoft-standard-WSL2
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.5 LTS
Release:        20.04
Codename:       focal 

Metadata

Metadata

Assignees

No one assigned

    Labels

    OS-wasitype-bugAn unexpected behavior, bug, or error

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions