# Core Dependencies from requirements.txt for AI for Beginners: Complete Python Stack

> Discover the core AI for Beginners Python dependencies from requirements.txt including TensorFlow Keras pandas gym and NLTK for deep learning NLP and more.

- Repository: [Microsoft/AI-For-Beginners](https://github.com/microsoft/AI-For-Beginners)
- Tags: tutorial
- Published: 2026-08-22

---

**The AI for Beginners curriculum depends on 20 pinned Python packages—including TensorFlow 2.17.0, Keras 3.13.2, pandas 2.2.2, gym 0.26.2, and NLTK 3.10.0—that collectively support deep learning, computer vision, natural language processing, and reinforcement learning experiments across the repository's notebooks.**

The `microsoft/AI-For-Beginners` repository provides a comprehensive, open-source curriculum for learning artificial intelligence. The exact software stack is declared in [`requirements.txt`](https://github.com/microsoft/AI-For-Beginners/blob/main/requirements.txt), which enumerates the core dependencies from requirements.txt for AI for Beginners required to execute the Jupyter notebooks. Installing these pinned packages ensures compatibility with the code samples in the `lessons/` directory and prevents version conflicts.

## Deep Learning and Neural Network Frameworks

The majority of the curriculum's neural network training relies on the TensorFlow ecosystem, supplemented by PyTorch utilities for model inspection.

### TensorFlow, Keras, and TensorBoard

The backbone for deep learning lessons is **TensorFlow** `2.17.0`, specified on line 16 of [`requirements.txt`](https://github.com/microsoft/AI-For-Beginners/blob/main/requirements.txt). It is paired with **Keras** `3.13.2` (line 5) as the high-level API for building sequential and functional models. Training metrics are visualized through **TensorBoard** `2.17.1` (line 17), backed by the **tensorboard-data-server** `0.7.2` (line 13) for efficient log streaming.

```python
import tensorflow as tf
from tensorflow import keras

model = keras.Sequential([
    keras.layers.Dense(64, activation='relu', input_shape=(32,)),
    keras.layers.Dense(10, activation='softmax')
])
model.compile(optimizer='adam', loss='sparse_categorical_crossentropy', metrics=['accuracy'])

```

### PyTorch Model Inspection

While TensorFlow drives most lessons, **torchinfo** `1.8.0` (line 19) provides layer-by-layer summary utilities for PyTorch networks whenever they appear in the curriculum.

```python
from torchinfo import summary
import torch.nn as nn

class Net(nn.Module):
    def __init__(self):
        super().__init__()
        self.fc = nn.Linear(784, 10)
    def forward(self, x):
        return self.fc(x)

summary(Net(), input_size=(1, 784))

```

### Pre-trained Models and Datasets

The curriculum leverages ready-made resources through **tensorflow-hub** `0.16.1` (line 15) for pre-trained model access and **tensorflow-datasets** `4.9.6` (line 14) for standardized dataset loading.

## Natural Language Processing Libraries

Text-based lessons combine classical NLP techniques with modern transformer tooling.

### Traditional NLP with NLTK and Gensim

**NLTK** `3.10.0` (line 6) supplies tokenization, stemming, and corpora handling for introductory NLP modules. **Gensim** `4.3.3` (line 1) supports topic modeling and word-embedding utilities.

### Hugging Face Tokenizers and Wrappers

For transformer-based demonstrations, the repository includes **huggingface** `0.0.1` (line 3) as a wrapper for the model hub, alongside **tokenizers** `0.20.0` (line 18) for fast text tokenization compatible with Hugging Face models.

```python
from tokenizers import Tokenizer

tokenizer = Tokenizer.from_pretrained("bert-base-uncased")
encoded = tokenizer.encode("Hello AI for Beginners!")
print(encoded.ids)

```

## Computer Vision and Image Processing

Visual AI lessons depend on three complementary imaging libraries:

- **imageio** `2.35.0` (line 4) simplifies reading and writing image files in notebooks.
- **pillow** `12.2.0` (line 8) handles basic image transformations via the PIL fork.
- **scikit-image** `0.24.0` (line 10) supplies advanced algorithms for computer vision exercises.

## Reinforcement Learning and Interactive Demos

Reinforcement learning modules use **gym** `0.26.2` (line 2) to instantiate classic control environments such as CartPole. Interactive visualizations and simple game demos are powered by **pygame** `2.6.0` (line 9).

```python
import gym

env = gym.make('CartPole-v1')
obs = env.reset()
for _ in range(1000):
    action = env.action_space.sample()
    obs, reward, done, info = env.step(action)
    if done:
        obs = env.reset()

```

## Data Manipulation, Visualization, and Utilities

Tabular data workflows rely on **pandas** `2.2.2` (line 7) for manipulation and analysis. Statistical plots are generated with **seaborn** `0.13.2` (line 11), built on top of Matplotlib. Long-running training loops display progress via **tqdm** `4.66.5` (line 20), while **smart-open** `7.0.4` (line 12) enables transparent streaming of large datasets from remote storage.

```python
import pandas as pd

df = pd.read_csv('data.csv')
print(df.head())

```

```python
import seaborn as sns
import matplotlib.pyplot as plt

sns.lineplot(data=df, x='epoch', y='accuracy')
plt.show()

```

## Installing the Core Dependencies

To replicate the exact environment defined in the Microsoft curriculum, run the following command from the repository root:

```bash
pip install -r requirements.txt

```

This installs all core dependencies from requirements.txt for AI for Beginners in a single step. If you prefer Conda, the repository also provides an [`environment.yml`](https://github.com/microsoft/AI-For-Beginners/blob/main/environment.yml) file that mirrors the Python packages and adds system-level libraries. A separate [`binder/requirements.txt`](https://github.com/microsoft/AI-For-Beginners/blob/main/binder/requirements.txt) file exists under the `binder/` directory for cloud-based execution via Binder.

## Summary

- The [`requirements.txt`](https://github.com/microsoft/AI-For-Beginners/blob/main/requirements.txt) file in `microsoft/AI-For-Beginners` pins 20 Python packages that cover deep learning, NLP, computer vision, and reinforcement learning.
- **TensorFlow** `2.17.0` and **Keras** `3.13.2` form the primary deep learning stack, while **torchinfo** `1.8.0` supports PyTorch model summaries.
- NLP lessons use **NLTK** `3.10.0`, **gensim** `4.3.3`, **huggingface** `0.0.1`, and **tokenizers** `0.20.0`.
- Computer vision workflows depend on **imageio** `2.35.0`, **pillow** `12.2.0`, and **scikit-image** `0.24.0`.
- Reinforcement learning demos require **gym** `0.26.2` and **pygame** `2.6.0`.
- Alternative environment definitions are available in [`environment.yml`](https://github.com/microsoft/AI-For-Beginners/blob/main/environment.yml) and [`binder/requirements.txt`](https://github.com/microsoft/AI-For-Beginners/blob/main/binder/requirements.txt).

## Frequently Asked Questions

### What is the main deep learning framework used in AI for Beginners?

The curriculum primarily uses **TensorFlow** `2.17.0` with the **Keras** `3.13.2` high-level API for building and training neural networks. These are the central deep-learning dependencies listed in [`requirements.txt`](https://github.com/microsoft/AI-For-Beginners/blob/main/requirements.txt).

### How do I install all core dependencies from the requirements.txt file?

Run `pip install -r requirements.txt` from the root of the cloned repository. This command installs every pinned package—including **pandas**, **seaborn**, **TensorFlow**, and **gym**—so the notebooks in the `lessons/` directory execute without import errors.

### Which NLP libraries are included in the AI for Beginners requirements?

The file specifies **NLTK** `3.10.0` for classical text processing and **gensim** `4.3.3` for word embeddings. It also includes **huggingface** `0.0.1` paired with **tokenizers** `0.20.0` for modern transformer-based NLP tasks.

### Are there separate dependency files for different environments?

Yes. In addition to the root [`requirements.txt`](https://github.com/microsoft/AI-For-Beginners/blob/main/requirements.txt), the repository contains an [`environment.yml`](https://github.com/microsoft/AI-For-Beginners/blob/main/environment.yml) for Conda users and a [`binder/requirements.txt`](https://github.com/microsoft/AI-For-Beginners/blob/main/binder/requirements.txt) file that configures the runtime for Binder cloud execution.