Setup Guide - Zero to AIΒΆ

Manual Installation with UVΒΆ

If you prefer manual control:

Install UVΒΆ

curl -LsSf https://astral.sh/uv/install.sh | sh

Create virtual environmentΒΆ

uv venv .venv
source .venv/bin/activate  # On macOS/Linux
# .venv\Scripts\activate   # On Windows

Install dependenciesΒΆ

# Core dependencies
uv pip install -r requirements.txt

# Or install specific packages from the curriculum stack
uv pip install torch transformers tiktoken sentence-transformers jupyter

Alternative: Traditional pip/venvΒΆ

If you prefer not to use UV:

# Create virtual environment
python -m venv .venv
source .venv/bin/activate

# Install dependencies
pip install -r requirements.txt

Verify InstallationΒΆ

# Check Python version
python --version  # Should be 3.11+

# Test imports
python -c "import torch; print(f'PyTorch {torch.__version__}')"
python -c "import transformers; print(f'Transformers {transformers.__version__}')"
python -c "import tiktoken; print('tiktoken βœ…')"
python -c "import sentence_transformers; print('sentence-transformers βœ…')"

# Start Jupyter
jupyter notebook

Dependencies OverviewΒΆ

Core ML/DLΒΆ

  • PyTorch - Deep learning framework

  • Transformers - HuggingFace library (BERT, GPT, etc.)

  • Torchvision - Vision models and datasets

TokenizationΒΆ

  • tiktoken - OpenAI’s tokenizer

  • tokenizers - HuggingFace tokenizers library

  • sentencepiece - Google’s tokenizer

Embeddings & Vector DBsΒΆ

  • sentence-transformers - Sentence embeddings

  • chromadb - Vector database

  • qdrant-client - Qdrant vector DB

  • weaviate-client - Weaviate vector DB

  • pymilvus - Milvus vector DB

  • pgvector - PostgreSQL vector extension

Data ScienceΒΆ

  • numpy, pandas, scikit-learn, scipy - Data science essentials

  • matplotlib, seaborn, plotly - Visualization

DevelopmentΒΆ

  • jupyter - Interactive notebooks

  • pytest, black, flake8 - Testing and formatting (dev extras)

Learning PathΒΆ

Once setup is complete, follow this path:

  1. 23-glossary/GLOSSARY.md

  2. MASTER_STUDY_GUIDE.md

  3. checklist.md

  4. Start with the first phase for your chosen track

  5. Use 00_START_HERE.ipynb inside each module when available

Which Requirements File to Use?ΒΆ

File

Use When

requirements.txt

Local development (pip)

environment.yml

Local development (Conda/Mamba)

colab_requirements.txt

Google Colab β€” skips pre-installed packages

kaggle_requirements.txt

Kaggle notebooks β€” skips pre-installed packages, requires Internet toggle enabled

requirements-replit.txt

Replit β€” auto-installed on run

pyproject.toml

uv pip install -e . or editable installs

TroubleshootingΒΆ

UV installation failsΒΆ

# Try with pip instead
pip install uv

PyTorch GPU supportΒΆ

For CUDA support, install PyTorch separately:

# See https://pytorch.org for your specific CUDA version
uv pip install torch torchvision --index-url https://download.pytorch.org/whl/cu118

PostgreSQL dependenciesΒΆ

For pgvector to work, ensure PostgreSQL development headers are installed:

# macOS
brew install postgresql

# Ubuntu/Debian
sudo apt-get install postgresql-server-dev-all

# Then reinstall psycopg2-binary
uv pip install --force-reinstall psycopg2-binary

Jupyter kernel not foundΒΆ

python -m ipykernel install --user --name=aiml

Environment VariablesΒΆ

Some notebooks require API keys or database connections. Create a .env file:

# OpenAI (for embeddings notebooks)
OPENAI_API_KEY=your_key_here

# Aurora PostgreSQL (for 6-vector-databases/06_aurora_pgvector_guide.ipynb)
AURORA_HOST=your-cluster.region.rds.amazonaws.com
AURORA_PORT=5432
AURORA_DATABASE=vectordb
AURORA_USER=postgres
AURORA_PASSWORD=your_password

# AWS (optional, for AWS services)
AWS_ACCESS_KEY_ID=your_key
AWS_SECRET_ACCESS_KEY=your_secret
AWS_DEFAULT_REGION=us-east-1

Why UV?ΒΆ

UV is a next-generation Python package manager:

βœ… 10-100x faster than pip
βœ… Better dependency resolution (like Poetry/PDM)
βœ… Drop-in replacement for pip commands
βœ… Written in Rust for maximum performance
βœ… Creates reproducible environments

Example speed comparison:

  • pip: ~45 seconds

  • UV: ~2 seconds

Need Help?ΒΆ

  • Check notebook 00_START_HERE.ipynb files in each section

  • Review README.md in each folder

Happy learning! πŸš€