Issue
I'm trying to get tensorflow working on my MacBook pro M1. However, I keep getting the following error when trying to import: zsh: illegal hardware instruction python
I have downloaded and installed tensorflow via this link.
These were my installation steps:
- install a venv:
python3 -m venv venv
. - drag the
install_venv.sh
(which is located within the downloaded folder) file to the terminal, add-p
at the end. - select the directory of the venv as the location where tensorflow should be installed.
- activate the venv.
- type "python".
- try to import tensorflow:
import tensorflow as tf
.
I'm using Python 3.8.2.
I've seen some tutorials where this exact method does work, so I don't know what's the issue here.
Solution
I've found the answer. Seemed like my terminal app was running in Rosetta. This can be changed by right clicking on the app -> get info -> disable "open with rosetta".
Answered By - georgev
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.