AI Academy/AI Foundations/Lesson 05
LESSON 05 · AI FOUNDATIONS

Set Up Python

A clean environment prevents dependency confusion and gives your AI project a predictable place to run.

Goal: Create a safe development environment30 minOutput: Environment health-check script
Commands
python3 -m venv .venv
source .venv/bin/activate
python -m pip install python-dotenv requests
touch .env .env.example requirements.txt
Environment pattern
API_KEY="put_real_key_in_dotenv"
PUBLIC_BASE_URL="http://127.0.0.1:8000"
Rules
  • Never commit .env.
  • Commit .env.example with safe placeholder values.
  • Print only safe health checks; never print credentials.
Deliverable

Build a small script that loads an environment variable and exits clearly if it is missing.

LEARNING CHECKPOINT

Capture the deliverable before moving on.

Environment health-check script is your evidence that this lesson has been applied, not just read.

✓ PRACTICAL OUTPUT