在用pip导入tensorflow时发现报错
ERROR: Could not find a version that satisfies the requirement tensorflow (from versions: none)
ERROR: No matching distribution found for tensorflow
不同于tensorflow官网给出的方案:https://tensorflow.google.cn/install/pip?hl=zh-cn#旧版%20TensorFlow
$ pip install --upgrade tensorflow
首先需要确认满足以下条件
- 配备苹果芯片或AMD GPU的Mac电脑
- macOS 12.0或更高版本
- Python 3.8或更高版本
- Xcode命令行工具:xcode-select --install
M系列芯片需要用另一个命令进行安装,步骤如下
1.安装基础的TensorFlow
$ pip install tensorflow-macos