-
-
Notifications
You must be signed in to change notification settings - Fork 147
Pi 3B+ Fails to produce any detctions - Illegal instruction - Downgrade Libraries #1303
Description
PLEASE READ THE DOCUMENTATION BEFORE SUBMITTING AN ISSUE
Describe the bug
A clean installation of BirdNET-Pi on a Raspberry Pi 3B+ using the recommended 64-bit OS completes successfully, but the system fails to produce any bird detections. The core analysis service (birdnet_server.service) repeatedly crashes with an "Illegal instruction" error. This is caused by an underlying Python library (librosa and its dependencies) being installed in a version that is not compatible with the Pi 3B+ CPU architecture.
To Reproduce
Steps to reproduce the behavior:
On a Raspberry Pi 3B+, perform a clean install of 64-bit Raspberry Pi OS (Bullseye) Lite.
Run the standard BirdNET-Pi installation script: curl -s https://raw.githubusercontent.com/mcguirepr89/BirdNET-Pi/main/newinstaller.sh | bash.
Complete the initial setup (set Latitude/Longitude, etc.).
Observe the web interface. The spectrogram and live audio may work, but no detections will ever be recorded.
Check the service log with sudo journalctl -u birdnet_server.service. You will see the service failing and restarting with a status=4/ILL error.
Expected behavior
After a successful installation on the recommended OS, the system should be able to analyze audio and produce bird detections without errors. The arecord and python3 processes should both be stable and "ON" in the Process Status list.
Additional context
The problem was diagnosed by manually testing Python library imports inside the birdnet virtual environment. An "Illegal instruction" error occurred when attempting to import the librosa library. Further testing proved that the TensorFlow Lite runtime (tflite-runtime) was not the cause of the crash.
The issue was resolved by manually downgrading librosa and its key scientific dependencies (numba, scipy, scikit-learn) to slightly older, known-compatible versions, and then resolving a minor numpy version conflict that this created.
Your build
Hardware: Raspberry Pi 3B+ (Revision a020d3)
Operating System: Raspberry Pi OS Bullseye (64-bit) Lite
Code or log snippets
The issue was isolated with the following command, which produced the "Illegal instruction" error:
Bash
(birdnet) $ python3 -c "import librosa; print('Librosa OK')"
Illegal instruction
The final working solution involved running these two commands inside the virtual environment:
Bash
Step 1: Downgrade the scientific libraries to compatible versions
pip install --force-reinstall "librosa==0.9.2" "numba==0.56.4" "scipy==1.10.1" "scikit-learn==1.2.2"
Step 2: Fix the resulting NumPy dependency conflict for tflite-runtime
pip install "numpy~=1.19.2"