RFE: Explain why `Wasmer is not available on this system`
Motivation
I see this why I try to use this module:
Traceback (most recent call last):
File "try_parse_cpuser.py", line 1, in <module>
from wasmer import Instance
File "/usr/lib/python3.4/site-packages/wasmer/__init__.py", line 1, in <module>
raise ImportError("Wasmer is not available on this system")
ImportError: Wasmer is not available on this system
What specifically do I need to do to fix this problem? Wasmer is definitely available:
> find /usr/local | grep wasmer
/usr/local/bin/wasmer
/usr/local/include/wasmer.h
/usr/local/include/wasmer_wasm.h
/usr/local/include/wasmer-README.md
/usr/local/lib/pkgconfig/wasmer.pc
/usr/local/lib/libwasmer.so.2.0.0
/usr/local/lib/libwasmer.so.2.0
/usr/local/lib/libwasmer.so.2
/usr/local/lib/libwasmer.so
/usr/local/lib/libwasmer.a
> wasmer -V
wasmer 2.0.0
… but I don’t know how I’m supposed to tell the module where to find what it needs.
Proposed solution
Reword the error to suggest better how to fix the problem.
Additional context
I’m on CentOS 7 and had to build/install Wasmer from source; the precompiled binaries don’t work with an OS this old. :(
Hello,
wasmer-python embeds Wasmer. It's not because you've Wasmer installed on your system that it will be used by wasmer-python.
I see you're using Python 3.4. wasmer-python is designed to work with Python 3.6 to 3.9. That's why it's not available for you.
I change to 1.0.0 instead of 1.1.0 as pip3 install wasmer==1.0.0 wasmer_compiler_cranelift==1.0.0 and use https://github.com/wasmerio/wasmer-python/blob/1.0.0/examples/ then works! So maybe 1.1.0 had some bug? @syrusakbary