mac m1如何安装tensorflow

运行时出错:

解决 RuntimeError: module compiled against API version 0xf but this version of numpy is 0xd

解决方法:

pip install numpy --upgrade

https://blog.csdn.net/gongchenyu/article/details/123498648

参考文章:

https://developer.apple.com/metal/tensorflow-plugin/

mac m1如何安装tensorflow_第1张图片
mac m1如何安装tensorflow_第2张图片

这下面的两句非常重要 就是一定要 

pip install --upgrade tensorflow-macos==2.9

很重要的文章  你要参考他们的几个命令:

https://medium.com/@yningz/how-to-install-and-actually-run-with-tensorflow-on-m1-m2-mac-with-metal-plugin-in-3-steps-81341d0a9363

pip install --upgrade tensorflow-metal==0.5.0

https://medium.com/@yningz/how-to-install-and-actually-run-with-tensorflow-on-m1-m2-mac-with-metal-plugin-in-3-steps-81341d0a9363

你可能感兴趣的:(机器学习)