Prerequisites and Dependencies to Set Up AI-Engineering-From-Scratch

Setting up the ai-engineering-from-scratch curriculum requires only Python 3.10+, basic programming skills, and the packages listed in requirements.txt, with optional support for Docker and Jupyter notebooks.

The ai-engineering-from-scratch repository provides a self-contained, 503-lesson curriculum designed to teach AI engineering from the ground up. Before executing the first lesson in Phase 1, you must satisfy minimal prerequisites and install the dependency stack outlined in the repository’s canonical files. This guide details the exact setup requirements, dependency specifications, and installation procedures derived from the official source code.

Prerequisites and System Requirements

The curriculum adopts a minimal barrier-to-entry approach, requiring only foundational capabilities documented in the README.md.

Programming Fundamentals

You need only the ability to write code in any language and a genuine interest in understanding how AI systems work under the hood. No formal background in mathematics, linear algebra, or machine learning is required, as the curriculum builds these concepts from scratch starting in Phase 1.

Python Environment Version

You must have Python 3.10 or higher installed alongside pip for package management. The README.md specifically recommends Python 3.10+ in the "Getting started" section to ensure compatibility with the deep learning frameworks utilized in later phases.

Core Dependencies in requirements.txt

The repository centralizes all Python package requirements in requirements.txt at the root level. This file enumerates the production-grade AI stack needed for later phases, including:

  • Deep Learning: torch, torchvision, torchaudio
  • Natural Language Processing: transformers, datasets, tokenizers, accelerate, tiktoken
  • Machine Learning: scikit-learn
  • Data Processing: numpy, pandas, pillow
  • Audio Processing: librosa, soundfile
  • API Clients: anthropic, openai
  • Visualization: matplotlib

The curriculum follows a "Build-It / Use-It" philosophy where Phase 0 (Setup & Tooling) prepares the environment before heavier dependencies like PyTorch are exercised in subsequent phases.

Step-by-Step Installation Guide

Execute the following commands in your terminal to replicate the canonical setup flow documented in the repository:

Clone the repository and navigate to the project directory:

git clone https://github.com/rohitg00/ai-engineering-from-scratch.git
cd ai-engineering-from-scratch

Create and activate an isolated Python virtual environment:

python -m venv .venv
source .venv/bin/activate

Install the complete dependency stack:

pip install -r requirements.txt

Initialize the reusable skill artifacts required by the curriculum:

python scripts/install_skills.py

This last step executes scripts/install_skills.py, which automates the creation of prompts, skills, and agent artifacts used throughout the 20-phase curriculum.

Optional Development Tools

While not strictly required, the repository provides lessons for enhanced development environments in phases/00-setup-and-tooling/:

  • Jupyter Notebooks: Install jupyter for interactive exploration of the linear algebra and machine learning lessons.
  • Docker: The lesson at phases/00-setup-and-tooling/07-docker-for-ai/ covers containerized workflows for reproducible AI environments.

Verifying Your Installation

Confirm your setup by running the first lesson in the math foundations phase:

python phases/01-math-foundations/01-linear-algebra-intuition/code/vectors.py

Successful execution indicates that Python, the virtual environment, and core dependencies are correctly configured.

Summary

  • Prerequisites: Basic programming ability (any language) and Python 3.10+ with pip
  • Dependencies: Install via pip install -r requirements.txt, which includes PyTorch, Transformers, scikit-learn, and supporting libraries
  • Automation: Execute python scripts/install_skills.py to generate curriculum artifacts
  • Optional Tools: Configure Jupyter and Docker using lessons in phases/00-setup-and-tooling/
  • Verification: Run the Phase 1 vector mathematics script to confirm successful setup

Frequently Asked Questions

Do I need prior machine learning experience to start ai-engineering-from-scratch?

No formal machine learning background is required. According to the README.md Prerequisites section, the curriculum builds necessary linear algebra, calculus, probability, and ML concepts from the ground up, assuming only basic programming literacy.

Which Python version is required for the curriculum?

Python 3.10 or higher is required. The README.md explicitly recommends Python 3.10+ to ensure compatibility with the deep learning frameworks and modern language features used throughout the 503 lessons.

What is the purpose of the install_skills.py script?

Located at scripts/install_skills.py, this script materializes reusable "skills" including prompts, agents, and automation artifacts that are referenced across lessons. Running this script ensures that outputs generated in early phases are properly structured and available for integration into later, more complex systems.

Is Docker mandatory for completing the curriculum?

Docker is optional. While phases/00-setup-and-tooling/07-docker-for-ai/ provides containerized workflow instructions, all lessons can execute in a standard Python virtual environment. Docker becomes valuable during production deployment phases requiring environment reproducibility.

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 →