Where to Find Pip Dependencies for AI for Beginners: Complete Setup Guide

The AI for Beginners repository maintains two separate requirements.txt files at the root level and in the binder/ folder, plus an optional environment.yml for Conda users.

Setting up the Microsoft AI for Beginners curriculum requires installing the correct Python packages. The repository provides version-pinned dependency files that ensure compatibility across different deployment scenarios. This guide maps each file to its specific use case and shows you how to install them.


Root requirements.txt: Core Curriculum Dependencies

The primary pip dependencies for AI for Beginners live in requirements.txt at the repository root.

This file captures the core libraries needed for the majority of lessons:

  • TensorFlow 2.17
  • PyTorch
  • Keras 3

Installing the Root Dependencies

Use this file for local development, virtual environments, or when running notebooks outside of Binder:

pip install -r https://raw.githubusercontent.com/microsoft/AI-For-Beginners/main/requirements.txt

binder/requirements.txt: Binder-Specific Packages

The repository maintains a separate dependency file at binder/requirements.txt for cloud notebook deployment.

This variant pins different versions to ensure compatibility with the Binder infrastructure:

  • TensorFlow 2.13 (older stable version for Binder)
  • tensorflow-text
  • transformers

Installing the Binder Dependencies

Use this version only when specifically configuring a Binder-compatible environment:

pip install -r https://raw.githubusercontent.com/microsoft/AI-For-Beginners/main/binder/requirements.txt

Alternative: Conda Environment Setup

For users preferring Conda, the repository provides environment.yml at the root. This file includes the same packages plus required conda channels in a single specification:

conda env create -f https://raw.githubusercontent.com/microsoft/AI-For-Beginners/main/environment.yml

File Reference Summary

File Path Purpose Best For
requirements.txt Core pip dependencies Local development, standard Python environments
binder/requirements.txt Binder-tuned pip dependencies MyBinder.org cloud deployment
environment.yml Conda environment specification Conda users needing channel management

Summary

  • Two requirements.txt files serve different deployment targets in the AI for Beginners repository.
  • Root requirements.txt contains the latest stable versions (TensorFlow 2.17, Keras 3) for local use.
  • binder/requirements.txt pins older versions (TensorFlow 2.13) plus tensorflow-text and transformers for cloud compatibility.
  • environment.yml provides a Conda-native alternative with identical package coverage.
  • All files use strict package==version syntax for reproducible installations.

Frequently Asked Questions

What is the difference between the two requirements.txt files?

The root requirements.txt targets modern local environments with TensorFlow 2.17 and Keras 3, while binder/requirements.txt pins TensorFlow 2.13 and adds tensorflow-text and transformers specifically for MyBinder infrastructure compatibility.

Can I use Conda instead of pip for AI for Beginners?

Yes. The repository includes environment.yml at the root level, which specifies the same packages through Conda channels. Run conda env create -f environment.yml to build a complete environment without manually managing pip dependencies.

Why does Binder use different dependency versions?

Binder's container infrastructure has specific constraints around CUDA drivers and pre-installed system libraries. The binder/requirements.txt pins TensorFlow 2.13 because that version has verified compatibility with the Binder build pipeline, whereas 2.17 may introduce breaking changes in that environment.

How do I verify my dependencies installed correctly?

After installation, import the key libraries in Python to confirm version alignment:

import tensorflow as tf
import torch
import keras

print(f"TensorFlow: {tf.__version__}")
print(f"PyTorch: {torch.__version__}")
print(f"Keras: {keras.__version__}")

Compare the output against the versions specified in your chosen requirements.txt file.

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →