TensorFlow 是一个开源的机器学习框架,广泛用于数据分析和深度学习。以下是在 Windows 系统上安装 TensorFlow 的步骤。

安装环境

在安装 TensorFlow 之前,请确保您的系统满足以下要求:

  • Windows 7 或更高版本
  • Python 3.5 或更高版本
  • Visual C++ Build Tools

安装步骤

  1. 安装 Python:从 Python 官网 下载并安装 Python 3.5 或更高版本。
  2. 安装 pip:在安装 Python 的过程中,勾选“Add Python 3.x to PATH”选项,以便将 Python 添加到系统环境变量中。
  3. 安装 Visual C++ Build Tools:从 Microsoft Visual C++ Build Tools 下载并安装。
  4. 安装 TensorFlow:打开命令提示符,输入以下命令:
pip install tensorflow

等待安装完成。

验证安装

安装完成后,可以通过以下命令验证 TensorFlow 是否安装成功:

python -c "import tensorflow as tf; print(tf.__version__)"

如果输出 TensorFlow 的版本号,则表示安装成功。

附加资源

如果您需要更详细的安装指南,可以访问 TensorFlow 官方文档

TensorFlow Logo