# What Are the Prerequisites for Using AI-For-Beginners?

> Discover the prerequisites for AI-For-Beginners. Learn what you need including Python, Conda or pip, and Git to start your AI learning journey with Microsoft.

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

---

**To use AI-For-Beginners, you need Python 3.8+, either a full Conda environment created from the repository's [`environment.yml`](https://github.com/microsoft/AI-For-Beginners/blob/main/environment.yml) file, or minimal pip packages for standalone examples, plus Git to clone the repository.**

The Microsoft AI-For-Beginners repository delivers a comprehensive 12-week curriculum covering neural networks, computer vision, and natural language processing. Before accessing the interactive Jupyter notebooks and hands-on labs, you must satisfy specific prerequisites for using AI-For-Beginners including proper Python versioning and dependency management.

## Core Technical Requirements

### Python Version Support

All scripts and notebooks in the curriculum require **Python 3.8 or newer**. This baseline ensures compatibility with the deep learning frameworks and scientific computing libraries used throughout the course.

### Conda Environment Configuration

The recommended setup uses the **[`environment.yml`](https://github.com/microsoft/AI-For-Beginners/blob/main/environment.yml)** file located in the repository root. This specification pins exact versions of all required libraries, including Jupyter, NumPy, Matplotlib, Scikit-Learn, OpenCV, PyTorch (with TorchVision, TorchText, and TorchData), and TensorFlow-compatible packages.

Creating this environment prevents version conflicts between the various AI frameworks.

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

```

### Minimal Pip Installation

For standalone examples only, you can install minimal dependencies documented in **[`examples/README.md`](https://github.com/microsoft/AI-For-Beginners/blob/main/examples/README.md)**. This approach requires only essential packages without the full Conda stack.

For Python scripts:

```bash
pip install numpy

```

For Jupyter notebooks:

```bash
pip install jupyter numpy pillow tensorflow

```

## Optional Hardware and Infrastructure

### GPU Acceleration

While not required, a **GPU** significantly accelerates training in deep learning lessons covering computer vision and natural language processing. The notebooks automatically detect GPU availability and provide CPU-only fallback when CUDA is unavailable.

### Git and Repository Management

You need Git to clone the repository. To save disk space, perform a sparse checkout excluding the `translations` folder:

```bash
git clone --filter=blob:none --sparse https://github.com/microsoft/AI-For-Beginners.git
cd AI-For-Beginners
git sparse-checkout set --no-cone '/*' '!translations' '!translated_images'

```

### Network Requirements

An **internet connection** is required for the initial notebook execution to download datasets and pre-trained models. Subsequent runs work offline.

## Step-by-Step Environment Setup

Follow this complete workflow to configure your system:

1. Clone the repository (sparse checkout recommended):

```bash
git clone --filter=blob:none --sparse https://github.com/microsoft/AI-For-Beginners.git
cd AI-For-Beginners
git sparse-checkout set --no-cone '/*' '!translations' '!translated_images'

```

2. Create the Conda environment:

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

```

3. Launch a lesson:

```bash
jupyter notebook lessons/3-NeuralNetworks/03-Perceptron/Perceptron.ipynb

```

Or run a standalone example:

```bash
python examples/01-hello-ai-world.py

```

## Essential Configuration Files

Understanding these key files ensures proper environment setup:

- **[`environment.yml`](https://github.com/microsoft/AI-For-Beginners/blob/main/environment.yml)**: The canonical Conda specification at the repository root defining all curriculum dependencies with exact versions.
- **[`examples/README.md`](https://github.com/microsoft/AI-For-Beginners/blob/main/examples/README.md)**: Documents minimal prerequisites for standalone examples, including specific pip commands for basic Python scripts and notebooks.
- **[`lessons/0-course-setup/how-to-run.md`](https://github.com/microsoft/AI-For-Beginners/blob/main/lessons/0-course-setup/how-to-run.md)**: Step-by-step guide for launching notebooks, configuring VS Code or Codespaces, and troubleshooting common issues.
- **[`lessons/0-course-setup/setup.md`](https://github.com/microsoft/AI-For-Beginners/blob/main/lessons/0-course-setup/setup.md)**: Overview of curriculum flow with links to detailed setup instructions.

## Summary

- **Python 3.8+** is mandatory for all curriculum components.
- **Conda environment** setup via [`environment.yml`](https://github.com/microsoft/AI-For-Beginners/blob/main/environment.yml) provides the most reliable dependency management for the full 12-week course.
- **Minimal pip installation** works for standalone examples in the `examples/` directory.
- **GPU support** is optional but recommended for deep learning lessons.
- **Sparse checkout** saves disk space by excluding translation files.

## Frequently Asked Questions

### Do I need a GPU to complete the AI-For-Beginners curriculum?

No. While a GPU accelerates training for computer vision and NLP lessons, all notebooks include CPU-only fallback code. You can complete the entire curriculum using CPU-only resources, though training times will be longer for deep learning models.

### Can I run the lessons without installing Conda?

Yes. If you prefer not to use Conda, install the minimal pip packages listed in [`examples/README.md`](https://github.com/microsoft/AI-For-Beginners/blob/main/examples/README.md): `numpy` for Python scripts, and `jupyter numpy pillow tensorflow` for notebooks. However, the Conda environment ensures exact version compatibility across all 12 weeks.

### What if I only want to run specific lessons, not the entire curriculum?

You can perform a sparse checkout to download only specific lesson folders, or simply install the minimal pip requirements and run individual notebooks. The [`environment.yml`](https://github.com/microsoft/AI-For-Beginners/blob/main/environment.yml) approach is recommended if you plan to explore multiple modules, as it includes all dependencies preemptively.

### Will the notebooks work offline after the first run?

Yes. After the initial execution downloads datasets and pre-trained models, all lesson notebooks function without an internet connection. Ensure you run each notebook at least once while online to cache the required data locally.