zsh: illegal hardware instruction /usr/local/bin/python3

I am trying to use the DeepFace API on my Macbook Air M1 chip. The laptop keeps bringing up this issue (zsh: illegal hardware instruction /usr/local/bin/python3 ) when I try to run my program. It uses tensorflow. Even if I just import tensorflow it throws the same error message. How do I fix this? I'm running Python 3.9.6

Hello arkap, an internet search for that error message and "DeepFace" returns several results suggesting this is a Tensorflow issue.

—jasonag.

This is typically code using AVX or AVX2 or fp16 extensions in Rosetta 2. So you'll need an ARM native or version of that x64 code that doesn't use those. Only SSE 4.2 max.

zsh: illegal hardware instruction /usr/local/bin/python3
 
 
Q