python -c “import tvm; print(tvm.file)” Traceback (most recent call last): File “”, line 1, in File “/workspaces/tvm/python/tvm/init.py”, line 24, in from tvm_ffi import register_object, register_global_func, get_global_func ModuleNotFoundError: No module named ‘tvm_ffi’
you need to do cd 3rdparty/tvm-ffi; pip install .; cd ..
2 Likes
按照gpt的提示,进行这个操作,但是不成功?python - <<‘PY’
from tvm.runtime import ffi
print(“ffi module path:”, ffi.file)
print(“ffi symbols:”, dir(ffi))
if hasattr(ffi, “_LIB”):
print(“
_LIB loaded:”, ffi._LIB)
else:
print(“
No _LIB found — check your LD_LIBRARY_PATH or build directory.”)
PY
Traceback (most recent call last):
File “”, line 1, in
ImportError: cannot import name ‘ffi’ from ‘tvm.runtime’ (/workspaces/tvm/python/tvm/runtime/init.py)
但是又遇到一个问题:python -c “import tvm; print(tvm._ffi.base._LIB)” Traceback (most recent call last): File “”, line 1, in AttributeError: module ‘tvm’ has no attribute ‘_ffi’. Did you mean: ‘ffi’?
likely this is due to not latest main, please try the latest main