Bot TutorialsGrok BotChatGPTClaudeGeminiCopilotPerplexityMore botsGuidesArticlesPapers
Topics
CookingHome automationFitnessCreative writingMusic productionCodingIndustrialPros (Professional track)
Search

Part 7 of 12

TensorFlow and Keras Install Requirements, Explained

ExplainerBy Bot Tutorials · Published · Facts last verified Nov 3, 2026

ML libraries series complete. "Review Your Training Code with a Bot: Checklist" was the finale. See every part in the series hub.

Part 7: what TensorFlow's pip page says about Python, platforms and GPUs, where it contradicts itself, and a real CPU check with Keras 3.

Video: TensorFlow and Keras Install Requirements, Explained (4:29). Narrated from this guide, with the real code and real output we ran. Captions included (caption file). Prefer reading? Everything in the video is in the guide below.

TensorFlow with its high-level Keras API is the other big deep learning stack alongside PyTorch. Its install rules depend on your operating system, CPU architecture, Python version and, for GPUs, the NVIDIA driver. This explainer walks through what TensorFlow's own pip page says, points out where the page disagrees with itself, and shows a real CPU install check. It's a good example of why you check a bot, and sometimes even the docs, against what actually happens.

What the bot can and can't do here

It can:

It can't:

Check first, install second

Read the install page for your exact platform, note the versions, then install in a fresh virtual environment.

What the pip page says

When we checked TensorFlow's "Install TensorFlow with pip" page on Nov 3, 2026:

Where the page disagreed with itself

The Software requirements section listed Python 3.9 to 3.12. Further down, a warning said that as of TensorFlow 2.21 Python 3.9 is no longer supported, suggested 3.10 to 3.13, and the wheel table included Python 3.13 wheels for 2.21.0. We tested the newer claim:

tensorflow 2.21.0 | keras 3.15.1
GPUs: []
final loss 0.0
weight 2.0 bias 1.0

That came from tensorflow-cpu 2.21.0 on Python 3.13.5, so the 3.13 wheels are real. We hid TensorFlow's informational log lines (they go to stderr), which is why only the script's own prints appear.

When docs disagree, trust a real install over either sentence, and tell the bot what you observed:

TensorFlow's pip page lists Python 3.9 to 3.12 in one place and has 3.13 wheels in another. I installed tensorflow-cpu 2.21.0 on Python 3.13.5 and it imported. Given that, which statement is out of date? Don't guess beyond what I've told you.

The check script

import os
os.environ.setdefault("TF_CPP_MIN_LOG_LEVEL", "2")
import tensorflow as tf, keras, numpy as np
print("tensorflow", tf.__version__, "| keras", keras.__version__)
print("GPUs:", tf.config.list_physical_devices("GPU"))
keras.utils.set_random_seed(0)
X = np.linspace(0, 1, 100).reshape(-1, 1).astype("float32")
y = 2 * X + 1
m = keras.Sequential([keras.Input(shape=(1,)), keras.layers.Dense(1)])
m.compile(optimizer=keras.optimizers.SGD(0.5), loss="mse")
h = m.fit(X, y, epochs=50, verbose=0)
print("final loss", round(h.history["loss"][-1], 5))
w, b = m.layers[0].get_weights()
print("weight", round(float(w[0][0]), 2), "bias", round(float(b[0]), 2))

Keras 3

Our install came with Keras 3.15.1. TensorFlow's Keras guide is the place to start. Keras 3 can also run on JAX or PyTorch backends, so if a bot shows you code from older tf.keras tutorials, check it against current docs before you rely on it.

GPU setup, documented

For a Linux GPU, the pip page's steps are: install the NVIDIA driver and check it with nvidia-smi, create a venv, pip install tensorflow[and-cuda], then run the GPU check. If no GPU appears, it describes linking NVIDIA libraries in the environment. For older TensorFlow releases, the "Build from source" page has tables of tested Python, compiler, CUDA and cuDNN versions. Use Part 1's checker for the driver floor.

Choosing between TensorFlow and PyTorch

We won't rank them; both are widely used and both have thorough official docs. Practical questions are more useful: which library does the tutorial, course or model you want to use rely on, which one does your team already know, and which one supports your platform? On native Windows with a GPU, for example, TensorFlow's own page points you to WSL2. A bot can list the trade-offs for your situation if you give it your platform and goals, but ask it to cite the install pages for anything about support.

Tested vs documented

Where to go next

The next part today tries JAX on the CPU.

Safety, licensing and privacy: read this before you run anything

This series is about learning and small personal projects with machine learning libraries. A bot is a helper, not an authority.

FAQ

Does TensorFlow support GPUs on native Windows?

Not in current versions. TensorFlow's pip page says 2.10 was the last release with GPU support on native Windows, and points to WSL2 instead.

Which Python versions does TensorFlow support?

The pip page wasn't consistent when we checked: one section listed Python 3.9 to 3.12, while a warning said 3.9 was dropped in 2.21 and listed 3.10 to 3.13 with 3.13 wheels. We installed tensorflow-cpu 2.21.0 on Python 3.13.5 and it ran.

Was this tested?

The CPU install and a tiny Keras model ran on our box. GPU setup is documented, not tested by us.

Sources

  1. TensorFlow: Install TensorFlow with pip
  2. TensorFlow: Build from source (tested configurations)
  3. TensorFlow: Keras guide
  4. NVIDIA: CUDA Toolkit Release Notes
  5. NVIDIA: CUDA GPU Compute Capability

More in this series

  1. Part 1: GPU, Driver and CUDA Compatibility: A Bot-Assisted Check · Guide
  2. Part 2: How Much Memory Does a Model Need? A Data Brief · Data brief
  3. Part 3: Pin Versions and Build Reproducible ML Environments · Walkthrough
  4. Part 4: NumPy and pandas Basics with a Bot: Cheat Sheet · Cheat sheet
  5. Part 5: Your First scikit-learn Model, Built with a Bot · Walkthrough
  6. Part 6: PyTorch on the CPU: First Steps with a Bot · Guide
  7. Part 7: TensorFlow and Keras Install Requirements, Explained (you are here) · Explainer
  8. Part 8: JAX on the CPU: Field Notes with a Bot · Field notes
  9. Part 9: Read Hugging Face Model Cards and Licenses with a Bot · Guide
  10. Part 10: Export a Model to ONNX and Run It: A Deep Dive · Deep dive
  11. Part 11: Read ML Error Messages and Profile Code: Cheat Sheet · Cheat sheet
  12. Part 12: Review Your Training Code with a Bot: Checklist · Checklist

See the ML Libraries with a Bot series hub · Latest on Bot Tutorials

Bot advice can be wrong. We cite official docs; check them yourself before acting, especially for anything involving money, safety or your data.