系统说明:
- macos: Ventura 13.3.1
- python: 3.9.12
- pip: 23.0.1
问题:
如果pip直接安装tensorflow会找不到合适版本的包
pip install tensorflow
ERROR: Could not find a version that satisfies the requirement tensorflow (from versions: none)
ERROR: No matching distribution found for tensorflow
解决:
#创建环境
bash ~/miniconda.sh -b -p $HOME/miniconda
source ~/miniconda/bin/activate
conda install -c apple tensorflow-deps
#安装tensorflow
python -m pip install tensorflow-macos
python -m pip install tensorflow-metal