Orientation and Python Environment Setup
Set up the Python environment, tools, and workflows you will use throughout the course.
Content
Learning Outcomes
Versions:
Watch & Learn
AI-discovered learning video
Learning Outcomes — Orientation and Python Environment Setup
Welcome back! You already skimmed the Syllabus Overview (nice move). Now we zoom in: what exactly should you be able to do after completing the Orientation and Python Environment Setup? This is the roadmap — not fluff, but the skills that let you stop staring at terminal errors like they’re mysterious hieroglyphs.
What is a 'Learning Outcome' here? (and why you should care)
Learning outcomes are clear, measurable statements describing what you will be able to do after this unit. Think of them as the GPS for your study session: they tell you where you’re going, how to know you arrived, and what detours are allowed.
Why it matters for this course: the first week isn't just hand-holding — it's the foundation for doing actual AI work in Python. If your environment is half-baked, model training becomes a cry for help and not an experiment.
How this connects to the Syllabus Overview
You read the Syllabus Overview and saw the big-picture goals: learn AI concepts, implement models in Python, and complete projects. These learning outcomes take that high-level plan and turn it into tangible capabilities for the Orientation module: installing Python, configuring environments, and verifying tools so later modules (data handling, ML algorithms, deep learning frameworks) work smoothly.
Specific, Measurable Learning Outcomes
By the end of the Orientation and Python Environment Setup module, you will be able to:
- Identify the differences between Python versions (3.8 vs 3.11) and explain which is recommended for the course and why.
- Install Python on your OS (Windows/macOS/Linux) or confirm an existing installation using command-line tools.
- Create and activate an isolated environment using either venv or conda, and explain the pros/cons of each choice.
- Install essential packages (numpy, pandas, scikit-learn, jupyter, matplotlib, and optionally torch/tensorflow) with pip or conda and verify their versions.
- Start a Jupyter Notebook/Lab session and run a simple Python cell that prints 'hello AI' and the installed package versions.
- Troubleshoot three common environment issues (path conflicts, permission errors, incompatible packages) and apply at least one remediation strategy.
- Document your environment reproducibly with a requirements.txt or environment.yml file and explain when to use each.
- Demonstrate a basic workflow: create environment → install packages → start notebook → run a short script that imports libraries successfully.
These are written with action verbs so they can be observed and graded.
Examples: What meeting each outcome looks like in practice
- Outcome 2: You run
python --version(orpython3 --version) and get a response likePython 3.10.12. - Outcome 3: You create an environment with
python -m venv envthensource env/bin/activate(macOS/Linux) orenv\Scripts\activate(Windows) and the prompt changes. - Outcome 6: When pip install throws a 'permission denied', you identify that using
--useror activating a virtual environment solves it.
How you'll demonstrate mastery (assessments & mapping)
| Learning Outcome | Formative Task | Summative Evidence |
|---|---|---|
| Identify Python versions | Short quiz item | Screenshot + explanation in lab submission |
| Install Python | Guided installation lab | Passing automated environment check script |
| Create environment | Hands-on exercise | Uploaded requirements.yml + steps log |
| Install packages | In-class lab | Notebook that imports packages without errors |
| Start Jupyter | Quick demo | Link to notebook on Binder or GitHub |
| Troubleshoot | Scenario-based task | Written solution + terminal output |
| Document env | File creation task | Valid requirements.txt or environment.yml |
| Demonstrate workflow | Mini-project | Repo with README showing steps + working notebook |
Quick Practical Checks & Commands (do these out loud to the terminal)
# Check Python version
python --version
# or
python3 --version
# Create and activate venv (macOS/Linux)
python -m venv env
source env/bin/activate
# Create and activate venv (Windows PowerShell)
python -m venv env
env\Scripts\Activate.ps1
# Install core packages
pip install numpy pandas scikit-learn jupyter matplotlib
# Export env for reproducibility
pip freeze > requirements.txt
# or with conda
conda env export > environment.yml
Pro tip: if 'python' points to Python 2 on your system, use 'python3' consistently.
Success Criteria & Rubric (quick three-tier)
- Level 3 (Proficient): All core outcomes met. Environment activates, notebook runs imports, environment file is reproducible, and you can fix one common error independently.
- Level 2 (Developing): Most outcomes met but one key element missing (e.g., packages installed but environment file incomplete). Needs minor instructor help to resolve one issue.
- Level 1 (Beginning): Multiple outcomes unmet. System-level errors or inability to run basic imports; requires guided troubleshooting.
Common Mistakes (and how you actually fix them)
- Mistake: Installing packages globally and hitting permission errors.
- Fix: Use virtual environments (venv/conda) or pip install --user.
- Mistake: Mixing pip and conda for the same package in one environment leading to conflicts.
- Fix: Prefer one installer per environment; recreate env if broken.
- Mistake: Wrong Python binary used in Jupyter kernel.
- Fix: Install ipykernel in the environment and register it:
python -m ipykernel install --user --name=myenv.
- Fix: Install ipykernel in the environment and register it:
Self-Assessment Checklist (tick, brag, or troubleshoot)
- I can report my Python version.
- I can create and activate a virtual environment.
- I can install the required packages and import them in a notebook.
- I can export a requirements.txt or environment.yml that reproduces my setup.
- I can fix at least one error without instructor help.
If you can't check three of these boxes, pause and re-run the Practical Checks section.
Closing: Why this matters (and one last motivational roast)
Getting your Python environment set up is boring only if you let it be. Do it right now, and future-you will be a calm, productive AI practitioner. Do it wrong, and future-you will be yelling at dependency hell between model runs. This module is small but high ROI: it unlocks everything else in the course.
Final one-liner: Fix your environment today, so tomorrow’s model crashing is just a learning opportunity — not a disaster movie.
Key takeaways:
- These learning outcomes are actionable and testable.
- They directly connect to items in the Syllabus Overview: reproducibility, coding projects, and assessments.
- Mastery here is a prerequisite for succeeding in later AI labs.
Ready? Run the checks, snap a screenshot for your lab submission, and move on to the next module with your environment humming like a well-oiled Jupyter machine.
Comments (0)
Please sign in to leave a comment.
No comments yet. Be the first to comment!