torch-mlir icon indicating copy to clipboard operation
torch-mlir copied to clipboard

ImportError: cannot import name '_cli_main' from 'torch_mlir.tools.import_onnx' (unknown location)

Open muwys518 opened this issue 2 years ago • 1 comments

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)

muwys518 avatar Dec 15 '23 10:12 muwys518

I encountered the same problem as well.

torch-mlir/lib/python3.11/site-packages (20240127.1096)

phoebesv avatar Feb 06 '24 03:02 phoebesv