我正在尝试在我的MacBook Air上安装TensorFlow,它在M1芯片上运行Big Sur。我一直在使用这个tutorial,一旦到达验证TensorFlow是否已正确安装的部分,我就会一直遇到同样的错误。
当我运行以下命令来验证安装时:
python -c "import tensorflow as tf;print(tf.reduce_sum(tf.random.normal([1000, 1000])))"我得到以下错误:
zsh: illegal hardware instruction python -c 我已经检查并确保终端没有在Rosetta中运行,并且我在其他地方找不到任何解决方案。

发布于 2021-01-21 12:56:22
TensorFlow目前不支持M1芯片
https://github.com/tensorflow/tensorflow/issues/46178#issuecomment-754810157
跟随主题进行积极讨论
https://stackoverflow.com/questions/65821356
复制相似问题