How to install MLIRPythonSources.Core?

I want to use MLIRPythonSources.Core in my project, but I was not successful installing it following the official installation instructions from Getting Started - MLIR . What should I do? Thank you for your attention.

Following the build instructions should produce a working python API that you can import mlir and try things out.

You will need to enable them in CMake, as here: llvm-project/mlir/CMakeLists.txt at main · llvm/llvm-project · GitHub

Further you will need to add the tools/mlir/python_packages directory to your PYTHONPATH. I thought we had this documented but I can’t find it now upstream. I just be thinking of projects that integrate it, which is mostly where I work. Upstream doc updates may be needed (or I forgot where they are).

If you want to integrate it into your own project, that is more complicated and the example is the documentation:

There are also a number of public implementations we can refer to.