# What Are the Dependencies for AI-For-Beginners?

> Discover the essential dependencies for the AI-For-Beginners curriculum. Learn about Conda environment definitions and pip requirements for seamless setup.

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

---

**The AI-For-Beginners curriculum relies on two primary dependency specifications: a Conda environment definition ([`environment.yml`](https://github.com/microsoft/AI-For-Beginners/blob/main/environment.yml)) for base packages and a pip requirements file ([`requirements.txt`](https://github.com/microsoft/AI-For-Beginners/blob/main/requirements.txt)) for specific PyPI versions.**

The microsoft/AI-For-Beginners repository provides a comprehensive 12-week curriculum covering artificial intelligence fundamentals. To ensure reproducibility across symbolic AI, neural networks, computer vision, and natural language processing lessons, the project defines exact dependency versions in configuration files at the repository root.

## Core Dependency Files

The dependencies for AI-For-Beginners are split between Conda and pip to handle both system-level libraries and Python-specific packages.

### Conda Environment Definition

The [`environment.yml`](https://github.com/microsoft/AI-For-Beginners/blob/main/environment.yml) file defines the base computational environment using the Conda package manager. According to the microsoft/AI-For-Beginners source code, this file specifies:

- **Python interpreter**: Latest stable Python release
- **Jupyter ecosystem**: `ipykernel`, `ipython`, `ipywidgets`, and `jupyter` for notebook execution
- **Core scientific stack**: `numpy` (1.26), `scipy` (1.13), `matplotlib` (3.9), and `pandas`
- **Machine learning**: `scikit-learn` for classical algorithms
- **Deep learning frameworks**: `pytorch`, `torchtext`, `torchvision`, and `torchdata` from the `pytorch` channel
- **Computer vision**: `opencv` from `conda-forge`
- **Utilities**: `requests` (2.32), `pip`, and `setuptools`

### Python Package Requirements

The [`requirements.txt`](https://github.com/microsoft/AI-For-Beginners/blob/main/requirements.txt) file enumerates exact PyPI versions required for the notebook examples. Key dependencies include:

- **TensorFlow ecosystem**: `tensorflow` (2.17.0), `keras` (3.13.2), `tensorflow-datasets` (4.9.6), `tensorflow-hub` (0.16.1), `tensorboard` (2.17.1), and `tensorboard-data-server` (0.7.2)
- **Natural language processing**: `nltk` (3.10.0), `gensim` (4.3.3), `huggingface` (0.0.1), and `tokenizers` (0.20.0)
- **Computer vision**: `imageio` (2.35.0), `pillow` (12.2.0), and `scikit-image` (0.24.0)
- **Reinforcement learning**: `gym` (0.26.2) and `pygame` (2.6.0)
- **Visualization and monitoring**: `seaborn` (0.13.2), `tqdm` (4.66.5), and `torchinfo` (1.8.0)
- **Data access**: `smart-open` (7.0.4)

## Dependency Categories by Curriculum Topic

The dependencies for AI-For-Beginners support distinct AI domains covered in the lessons.

### Deep Learning Frameworks

Both **PyTorch** and **TensorFlow/Keras** are required to support the neural network and transformer lessons. The curriculum uses `torch`, `torchvision`, and `torchtext` for PyTorch implementations, while `tensorflow` (2.17.0) and `keras` (3.13.2) handle the TensorFlow-based tutorials.

### Natural Language Processing

NLP lessons depend on `nltk` (3.10.0) for tokenization and corpora, `gensim` (4.3.3) for word embeddings and topic modeling, and `tokenizers` (0.20.0) for transformer model preprocessing. The `huggingface` (0.0.1) package provides access to the Hugging Face Hub for downloading pre-trained models.

### Computer Vision

Vision modules require `opencv` for image loading and preprocessing, supplemented by `pillow` (12.2.0) for image manipulation and `scikit-image` (0.24.0) for advanced image processing functions. The `imageio` (2.35.0) library handles simple image I/O operations.

### Reinforcement Learning

RL environments utilize `gym` (0.26.2) for standardized environment interfaces and `pygame` (2.6.0) for interactive graphics and event handling in custom environment implementations.

## Installation Instructions

To install the dependencies for AI-For-Beginners, execute the following commands from the repository root.

First, create and activate the Conda environment defined in [`environment.yml`](https://github.com/microsoft/AI-For-Beginners/blob/main/environment.yml):

```bash
conda env create -f environment.yml
conda activate ai4beg

```

Then install the pip-based requirements:

```bash
pip install -r requirements.txt

```

Verify the installation by importing core libraries in a Jupyter notebook:

```python
import numpy as np
import torch
import tensorflow as tf
import matplotlib.pyplot as plt

print("All core libraries loaded successfully!")

```

## Environment Variations

The repository provides additional configuration files for specific deployment scenarios:

- **[`binder/environment.yml`](https://github.com/microsoft/AI-For-Beginners/blob/main/binder/environment.yml)**: Trimmed version for Binder deployments, providing an online Jupyter environment without local installation
- **[`binder/requirements.txt`](https://github.com/microsoft/AI-For-Beginners/blob/main/binder/requirements.txt)**: Mirrors the root requirements for Binder's isolated environment
- **[`.devcontainer/environment.yml`](https://github.com/microsoft/AI-For-Beginners/blob/main/.devcontainer/environment.yml)**: Configuration for VS Code devcontainers, ensuring fully reproducible development setups in containerized environments

## Summary

- The **dependencies for AI-For-Beginners** are defined in [`environment.yml`](https://github.com/microsoft/AI-For-Beginners/blob/main/environment.yml) (Conda) and [`requirements.txt`](https://github.com/microsoft/AI-For-Beginners/blob/main/requirements.txt) (pip) at the repository root.
- **Conda packages** include Python, Jupyter, NumPy (1.26), SciPy (1.13), PyTorch ecosystem, and OpenCV.
- **Pip packages** specify exact versions for TensorFlow (2.17.0), Keras (3.13.2), NLP libraries (NLTK, Gensim, Hugging Face), and RL tools (Gym, Pygame).
- Installation requires **two steps**: `conda env create -f environment.yml` followed by `pip install -r requirements.txt`.
- Alternative configurations exist for **Binder** (`binder/`) and **VS Code devcontainers** (`.devcontainer/`).

## Frequently Asked Questions

### What Python version does AI-For-Beginners require?

The curriculum targets the latest stable Python release as specified in [`environment.yml`](https://github.com/microsoft/AI-For-Beginners/blob/main/environment.yml). The Conda environment definition handles the Python interpreter installation automatically, ensuring compatibility with all downstream packages.

### Can I install AI-For-Beginners dependencies without Conda?

While possible, using Conda is strongly recommended. The [`environment.yml`](https://github.com/microsoft/AI-For-Beginners/blob/main/environment.yml) file specifies channels like `conda-forge` and `pytorch` that provide optimized binaries for system-level dependencies such as OpenCV and PyTorch. Pure pip installation may fail to resolve these system dependencies correctly.

### What is the difference between environment.yml and requirements.txt?

The [`environment.yml`](https://github.com/microsoft/AI-For-Beginners/blob/main/environment.yml) file defines the **base Conda environment** including the Python interpreter, Jupyter, and compiled libraries like OpenCV and PyTorch. The [`requirements.txt`](https://github.com/microsoft/AI-For-Beginners/blob/main/requirements.txt) file contains **PyPI-specific packages** that require pip installation, including exact version pins for TensorFlow, Keras, and specialized AI libraries. Both files are required for a complete setup.

### How do I verify that all dependencies installed correctly?

After activating the environment (`conda activate ai4beg`), run the sanity check by importing core libraries: `numpy`, `torch`, `tensorflow`, and `matplotlib`. Successful imports without errors confirm that the dependencies for AI-For-Beginners are properly configured.