​brew install pyenv​

​pyenv install 3.7.15​

然后会安装到
/Users/yourname/.pyenv/versions/3.7.15/bin/python3

然后
​​​brew install hdf5​

​export HDF5_DIR=/opt/homebrew/opt/hdf5​

​/Users/yourname/.pyenv/versions/3.7.15/bin/pip3 install --upgrade https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.14.0-py3-none-any.whl​

然后跑tensorflow还是报错
​​​mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')​

因为MacOS13本不支持python3.7及以下,而tensorflow1.14已经没有python3.7及以上版本