onnxruntime
onnxruntime copied to clipboard
[Build] build python wheel fails
Describe the issue
Building the wheel from source fails on Ubuntu 22, but it builds successfully when using the tagged release v1.18.0.
Urgency
No response
Target platform
linux-x86_64
Build script
./build.sh --config Debug --enable_pybind --build_wheel --build_shared_lib
Error / output
error: no matching function for call to ‘pybind11::dtype::dtype(NPY_TYPES)’
173 | py::array result(py::dtype(NPY_OBJECT), tensor.Shape().GetDims());
[...]
: error: no matching function for call to ‘pybind11::dtype::dtype(const int&)’
197 | pybind11::array result(py::dtype(numpy_type), tensor.Shape().GetDims(),
[...]
/home/daniaffch/Desktop/gsoc/onnxruntime/onnxruntime/python/onnxruntime_pybind_state.cc:197:36: error: invalid conversion from ‘int’ to ‘const char*’ [-fpermissive]
197 | pybind11::array result(py::dtype(numpy_type), tensor.Shape().GetDims(),
Visual Studio Version
No response
GCC / Compiler Version
11.4.0
@DaniAffCH, It seems to be related to numpy version. Could you try different numpy version (1.26 vs 2.0) with main branch as well?
@tianleiwu thank you for the support. I tried both versions of numpy but the same issue persists.
This issue has been automatically marked as stale due to inactivity and will be closed in 30 days if no further activity occurs. If further support is needed, please provide an update and/or more details.
@tianleiwu thank you for the support. I tried both versions of numpy but the same issue persists.
@DaniAffCH Hello, I was wondering if you solved this issue? I met the same issue,
Applying stale label due to no activity in 30 days
Applying stale label due to no activity in 30 days
Closing issue due to no activity in 30 days