onnxruntime: Illegal instruction when importing onnxruntime
Describe the issue
In a fresh Raspberry PI OS Bookworm 64 bits install on a Raspberry PI 4, after installing onnxruntime using pip in a VirtualEnvironment, when importing it, i get:
(artStyle) pi@artsyStyle:~/artStyle $ python
Python 3.11.2 (main, Nov 30 2024, 21:22:50) [GCC 12.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import onnxruntime
Illegal instruction
Here’s the system specs:
Raspberry PI OS:
cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 12 (bookworm)"
NAME="Debian GNU/Linux"
VERSION_ID="12"
VERSION="12 (bookworm)"
VERSION_CODENAME=bookworm
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
Python Version:
python -V
Python 3.11.2
ONNX Runtime version installed by pip:
onnxruntime-1.21.0-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
To reproduce
- Fresh Install Raspberry PI OS Bookworm 64 bits
- Create a virtual environment with pip
- Install onnxruntime
- try to import it.
Urgency
I’m not saying it’s urgent, but it’s definitely an issue. Raspberry PIs are used at the edge all the time.
Platform
Linux
OS Version
Debian GNU/Linux 12 (bookworm)
ONNX Runtime Installation
Released Package
ONNX Runtime Version or Commit ID
onnxruntime-1.21.0-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
ONNX Runtime API
Python
Architecture
ARM64
Execution Provider
Default CPU
Execution Provider Library Version
No response
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 3
- Comments: 18 (12 by maintainers)
Commits related to this issue
- Update core module dependencies to latest alpha versions (#731) # Description Update core_modules to validate latest alpha version compat. # Issues Blacklists an onnxruntime version to mitigate http... — committed to NeonGeckoCom/NeonCore by NeonDaniel 2 years ago
- [ARM CPU] Fix fp16 const initialization on no-fp16 platform (#23978) ### Description Fix fp16 const initialization on no-fp16 platform [such as Raspberry PI](https://github.com/microsoft/onnxruntime/... — committed to microsoft/onnxruntime by fajin-corp 2 years ago
- build(install): avoid swallowing stdout of the `pip install` command in the `install.sh`, lock onnxruntime to 1.20.1, related: <https://github.com/microsoft/onnxruntime/issues/23957> — committed to ubopod/ubo_app by sassanh 2 years ago
- [ARM CPU] Fix fp16 const initialization on no-fp16 platform (#23978) ### Description Fix fp16 const initialization on no-fp16 platform [such as Raspberry PI](https://github.com/microsoft/onnxruntime/... — committed to microsoft/onnxruntime by fajin-corp 2 years ago
- build(install): avoid swallowing stdout of the `pip install` command in the `install.sh`, lock onnxruntime to 1.20.1, related: <https://github.com/microsoft/onnxruntime/issues/23957> — committed to ubopod/ubo_app by sassanh 2 years ago
- Sync msft 1.22 base (#651) * Quant tool: Add `nodes_to_exclude` in `get_qnn_qdq_config` (#23779) * [ORT/CI_Pipeline] Use --enable_generic_interface in ORT builds for EP testing (#23801) Summary of ... — committed to intel/onnxruntime by ankitm3k 2 years ago
I ran into this too. Seems like a regression with
1.21.0as1.20.1works well.If it helps anyone, this is the strace:
It works. I can import it without any errors.