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

Most upvoted comments

I ran into this too. Seems like a regression with 1.21.0 as 1.20.1 works well.

If it helps anyone, this is the strace:

futex(0x7f9a633764, FUTEX_WAKE_PRIVATE, 2147483647) = 0
--- SIGILL {si_signo=SIGILL, si_code=ILL_ILLOPC, si_addr=0x7f9a7028f4} ---
+++ killed by SIGILL +++
Illegal instruction

Please run

python3 -m pip install coloredlogs flatbuffers numpy packaging protobuf sympy 

before running that installation command

It works. I can import it without any errors.