Onnxruntime: How to import onnxruntime when I build from source?

Created on 8 Jul 2020  路  2Comments  路  Source: microsoft/onnxruntime

I have build the onnxruntime use "./build.sh --config RelWithDebInfo --build_shared_lib --parallel" successully.

Then how to import onnxruntime? or before I import onnxruntime what else should I do?

build support

Most helpful comment

Also use
--enable_pybind along with the other flags mentioned above

All 2 comments

Hi @dongzhen123
According to the BUILD.md, you need to add different flag for different APIs.

Take Python on Linux as an example, you should use something like:

# build the Python wheel file from source code
./build.sh --config RelWithDebInfo --build_shared_lib --parallel --build_wheel

# install Python wheel package
pip install build/Linux/RelWithDebInfo/dist/*.whl

Then you're all set.

Also use
--enable_pybind along with the other flags mentioned above

Was this page helpful?
0 / 5 - 0 ratings