系统要求
- Python版本:3.7 - 3.11(推荐使用Python 3.9)
- 操作系统:Windows / macOS / Linux
- 硬件加速(可选):NVIDIA GPU + CUDA Toolkit(了解更多)
安装方法
1. 使用 pip 安装
pip install tensorflow
✅ 安装完成后可尝试运行:
import tensorflow as tf
print(tf.__version__)
2. 使用 conda 安装
conda install -c conda-forge tensorflow
3. 从源码编译(高级用户)
查看官方文档 获取详细步骤