Reputation: 1
I was trying to install smbus2 with pip3 in raspberrypi 4(raspberry pi os 64bit). But it says "Illegal instruction". Why does it happen and How can I solve it?
pi@raspberrypi:~ $ pip3 install smbus2
Illegal instruction
Upvotes: 0
Views: 2543
Reputation: 338
I originally created the environment on my raspberry pi 4 with the defaults conda channel. In this environment pip caused this "Illegal instruction" error. Once I switched to the conda-forge channel everything worked as expected without errors.
I had the idea, because the miniforge base environment worked on a raspberry pi out of the box: https://github.com/conda-forge/miniforge
There it says: "conda-forge set as the default (and only) channel".
Upvotes: 0
Reputation: 3025
In general, which means there may be a million exceptions, illegal instruction means you're using s/w that was compiled against a different architecture. RPI0 is arm6 so if you install something compiled with arm7 for example you'll get that error.
You might find a better explanation here: https://forums.raspberrypi.com/viewtopic.php?t=293114
Upvotes: 0