torch-mlir
torch-mlir copied to clipboard
ImportError: cannot import name '_cli_main' from 'torch_mlir.tools.import_onnx' (unknown location)
I'm following README. After installing the dependencies and
$ pip install --pre torch-mlir torchvision -f https://llvm.github.io/torch-mlir/package-index/ --extra-index-url https://download.pytorch.org/whl/nightly/cpu
the script crashes with the following stacktrace:
torch-mlir-import-onnx
Traceback (most recent call last):
File "/home/roger.luo/miniconda3/envs/torch-mlir/bin/torch-mlir-import-onnx", line 5, in <module>
from torch_mlir.tools.import_onnx import _cli_main
ImportError: cannot import name '_cli_main' from 'torch_mlir.tools.import_onnx' (unknown location)
packages version like this
torch-mlir/lib/python3.11/site-packages (20231214.1052)
I encountered the same problem as well.
torch-mlir/lib/python3.11/site-packages (20240127.1096)