Mac m1 "Illegal instruction: 4"

Hello, I’m a Perceval newbie. I’m running Python 3.9 on a Mac m1. I did a pip install perceval-quandela, and it installed fine, but then when I tried import perceval as pcvl, I get “Illegal instruction: 4”.
I also tried git clone and install, which didn’t complain.
The trouble occurs when I do ‘import perceval’.
I don’t see other posts on this since April. I’m wondering 1) if there’s a workaround; or 2) whether I need to try Perceval on a different system.

Hello @sploiber,

Perceval use an optimized library written in C++ (QuandeLibC) which is pre-compiled for each CPU architecture.
And it looks like you’re running a python for an intel chip.

If you’re using python from the official distribution (Python Releases for macOS | Python.org)
please make sure to use the ‘universal’ installer
and if you’re using anaconda, please make sure to use the ‘M1’ installer (Anaconda | Anaconda Distribution)

Hello @mario-valdivia. I got some help, and learned I needed an Anaconda for arm64, which had its own Python for arm64. I am past this first problem now - so I will go on to your examples. Thanks for your reply here.

1 Like