AI-Engineering-from-Scratch Dependencies: Python, TypeScript, Rust, and Julia Libraries
The ai-engineering-from-scratch project uses a multi-language dependency structure with Python packages centralized in requirements.txt, TypeScript packages declared in capstone-specific package.json files, and zero external dependencies for Rust and Julia lessons.
The rohitg00/ai-engineering-from-scratch curriculum is a comprehensive educational repository that teaches AI engineering through four programming languages. Understanding the complete ai-engineering-from-scratch dependencies is essential for running the hands-on lessons, which follow a deliberate progression from zero-dependency implementations to production-grade frameworks.
Python Dependencies in requirements.txt
The Python stack consolidates all dependencies in the root-level requirements.txt. This manifest bundles production-grade machine learning frameworks alongside data science utilities.
Core packages include:
- Deep learning:
torch,torchvision,torchaudio,transformers,datasets,tokenizers,accelerate - Data science:
numpy,pandas,scikit-learn,matplotlib - Multimedia processing:
pillow,librosa,soundfile - LLM tooling:
openai,anthropic,tiktoken - Development environment:
jupyter
TypeScript Dependencies for Capstone Projects
Unlike the centralized Python approach, TypeScript dependencies are decentralized across capstone lessons. Each project maintains its own manifest under phases/19-capstone-projects/*/code/ts/package.json.
Common runtime dependencies include:
zod– Schema validation used across multiple capstones for type safetyhono– Web framework utilized in specific lessons such as the RAG over codebase implementation
To install TypeScript dependencies for a specific lesson, navigate to the lesson directory and run:
cd phases/19-capstone-projects/01-terminal-native-coding-agent/code/ts
npm install
npm run start
Rust and Julia: Standard Library Only
The curriculum enforces a standard-library-only policy for Rust and Julia implementations.
Rust lessons rely exclusively on the Rust standard library with no external crates. This restriction is formally defined in AGENTS.md under the Allowed-Dependencies policy.
Julia lessons similarly prohibit third-party packages, utilizing only built-in modules such as Random, Statistics, LinearAlgebra, and Printf.
How to Install the Dependencies
Python Environment Setup
Create a virtual environment and install the full Python stack:
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
Alternatively, use the provided helper script:
python scripts/install_skills.py
This script installs the Python dependencies and links the generated skills for the complete curriculum.
TypeScript Environment Setup
For each capstone requiring Node.js:
cd phases/19-capstone-projects/[lesson-name]/code/ts
npm i
Running Rust Lessons
No installation required beyond the Rust compiler:
rustc path/to/lesson/main.rs -O && ./main
Running Julia Lessons
Execute directly with the Julia runtime using only standard library modules:
julia path/to/lesson/main.jl
Dependency Policy and Governance
The AGENTS.md file establishes the philosophical boundary between "Build-It" and "Use-It" phases. This policy mandates that early algorithm implementations use zero external libraries (enforced for Rust and Julia), while later phases demonstrate production equivalents using frameworks like PyTorch and Hono. This intentional layering ensures conceptual clarity before introducing abstraction complexity.
Summary
- Python: All dependencies live in root
requirements.txt, covering PyTorch, Transformers, OpenAI, and data science stacks - TypeScript: Distributed across
phases/19-capstone-projects/*/code/ts/package.json, primarily usingzodand occasionallyhono - Rust: Zero external crates; standard library only per
AGENTS.mdpolicy - Julia: No third-party packages; relies on
Random,Statistics,LinearAlgebra, andPrintf - Automation: Use
scripts/install_skills.pyfor one-command Python setup
Frequently Asked Questions
Where are the Python dependencies defined in ai-engineering-from-scratch?
All Python dependencies are declared in the requirements.txt file at the repository root. This single manifest contains the complete set of libraries needed for the Python-based lessons, including PyTorch, Transformers, and various data science tools. The file serves as the source of truth for the entire Python curriculum.
Do the TypeScript capstone projects share a single package.json?
No. Unlike the Python setup, each TypeScript capstone maintains its own package.json under phases/19-capstone-projects/[specific-lesson]/code/ts/. While many share common dependencies like zod for validation, each lesson directory must have its dependencies installed individually via npm install.
Why don't the Rust lessons use external crates?
The repository follows a "stdlib-first" philosophy enforced by the Allowed-Dependencies policy in AGENTS.md. This design forces learners to understand core algorithms without abstraction layers before graduating to framework-based implementations in other languages. Consequently, all Rust lessons compile with only the standard library using commands like rustc path/to/lesson/main.rs -O.
Is there a helper script to install all Python dependencies at once?
Yes. The repository includes scripts/install_skills.py, which automates the installation of all Python packages listed in requirements.txt and links the generated skills. This script provides the fastest path to getting the complete Python environment running for the entire curriculum.
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:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →