Install TensorFlow with pip

This guide is for the latest stable version of TensorFlow. For the preview (nightly), use the pip package named tf-nightly. See these tables for requirements for previous versions of TensorFlow. For CPU-only compilation, use the pip package named tensorflow-cpu.

Here are the quick versions of the installation commands. Scroll down for step-by-step instructions.

Hardware requirements

Note: TensorFlow binaries use AVX statements that may not run on older CPUs.

The following devices enabled for


  • NVIDIA® GPU card with CUDA® 3.5, 5.0, 6.0, 7.0, 7.5, 8.0 and higher architectures. See the list of CUDA-enabled® GPU cards.
  • For GPUs with unsupported CUDA® architectures, or to avoid JIT compilation from PTX, or to use different versions of NVIDIA libraries, see the® Linux from source build guide.
  • The packages do not contain PTX code except for the latest CUDA® architecture supported; therefore, TensorFlow is not loaded on older GPUs when CUDA_FORCE_PTX_JIT=1 is set. (See Application compatibility for more information.)

Note: The error message “Status: Device kernel image is invalid” indicates that the TensorFlow package does not contain PTX for your architecture. You can enable compute capabilities by building TensorFlow from the source.

System Requirements

Ubuntu 16.04 or higher (64-bit) macOS 10.12.6 (Sierra) or higher (64-bit) (without GPU support) Windows Native – Windows 7 or higher (64-bit) (no GPU support after TF 2.10) Windows

  • WSL2 – Windows 10 19044 or higher (64-bit)
  • Note:

  • GPU
  • support is available for Ubuntu and Windows with CUDA-enabled cards

  • .


Software requirements

Python 3.8-3.11 pip version 19.0 or higher for

  • Linux (requires manylinux2014 support)
  • and Windows. pip version 20.3 or higher for macOS.

  • Windows Native requires Microsoft Visual C++ Redistributable for Visual Studio 2015, 2017, and 2019
  • The following NVIDIA software is only required for GPU support. NVIDIA GPU drivers

version 450.80.02 or higher.


  • ®
  • CUDA® Toolkit 11.8.
  • cuDNN SDK 8.6.0.
  • (Optional) TensorRT to improve latency and throughput for inference.

Step-by-step instructions

Package location

Some installation mechanisms require the TensorFlow Python package URL. The value you specify depends on your version of Python.

GPU VersionURL support 3.8 CPU support for Python 3.8 CPUs only Python 3.9 GPUs Python 3.9 CPU only Python 3.10 GPU support Python CPU only 3.10 macOS (CPU only)Python 3.8 Python 3.9 Python 3.10 WindowsPython 3.8 CPU only Python 3.9 CPU only Python 3.10 CPU only

Contact US