环境准备

确保已安装 Python(推荐 3.7-3.10 版本)和 pip
⚙️ 系统要求

  • Windows / macOS / Linux 均支持
  • GPU 加速需额外安装 CUDA 驱动(可选)

安装方法

方法一:使用 pip 安装

pip install tensorflow

验证安装
运行以下代码检查 TensorFlow 是否安装成功:

import tensorflow as tf
print(tf.__version__)
TensorFlow_Installation

方法二:使用 Conda 安装

conda install -c conda-forge tensorflow

扩展阅读

🔗 TensorFlow 官方文档 提供更详细的配置说明与版本兼容性信息。
📌 提示:安装时遇到问题可参考 常见问题解答

TensorFlow_Environment