Skip to content

On macOS this worked with Python 3.9 but not 3.11 #1

@simonw

Description

@simonw

I tried running this just now on macOS and got the following error:

ImportError: Wasmer is not available on this system

See also:

It looks like there isn't currently a build of wasmer available for macOS Python 3.11. I resolved the problem by using Python 3.9 instead, like this:

python-sandbox-wasm % python3.9 -m venv venv                   
python-sandbox-wasm % source venv/bin/activate
(venv) python-sandbox-wasm % pip install -r requirements/requirements.txt
Collecting wasmer==1.1.0
  Downloading wasmer-1.1.0-cp39-cp39-macosx_10_7_x86_64.whl (1.5 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.5/1.5 MB 2.9 MB/s eta 0:00:00
Collecting wasmer-compiler-cranelift==1.1.0
  Downloading wasmer_compiler_cranelift-1.1.0-cp39-cp39-macosx_10_7_x86_64.whl (1.7 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.7/1.7 MB 4.9 MB/s eta 0:00:00
Installing collected packages: wasmer-compiler-cranelift, wasmer
Successfully installed wasmer-1.1.0 wasmer-compiler-cranelift-1.1.0
(venv) python-sandbox-wasm % python example_sandbox.py 
wasi stdout
WARNING: this string is the result of executing unknown code, so be careful how you use it!
####
Hello, world!
####

Might be worth mentioning this in the README.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions