系统要求 📊
- 操作系统:Windows 10+/Linux/macOS
- Python版本:3.7 - 3.11(推荐3.9)
- 显卡要求:NVIDIA GPU(推荐CUDA 11.x)
- 依赖库:需安装Python环境配置指南中提及的工具
安装方法 🛠️
通过pip安装 📦
pip install tensorflow
⚠️ 若需GPU加速,请先安装NVIDIA驱动与CUDA工具包
通过conda安装 🥑
conda install -c conda-forge tensorflow
从源码编译 🧩
git clone https://github.com/tensorflow/tensorflow.git
cd tensorflow
pip install --upgrade pip
pip install -e .
验证安装 🧪
import tensorflow as tf
print(tf.__version__)
✅ 成功输出版本号表示安装完成
常见问题 ❓
- 问题:安装后无法使用GPU
解决:检查CUDA安装指南是否正确配置