Setup Guide

Step-by-step installation instructions for everything you need in this course.

Choose your operating system where indicated. If you get stuck on any step, bring your questions to class — we'll get you sorted out.

1. Install Python

Python is the programming language we'll use for the entire course. We need version 3.8 or newer.

1

Download Python

Go to python.org/downloads and click the big yellow "Download Python 3.x.x" button.

2

Run the Installer

Open the downloaded .exe file. On the first screen:

IMPORTANT: Check the box that says "Add python.exe to PATH" at the bottom of the installer. This is the #1 cause of issues — don't skip it!

Then click "Install Now" (the default options are fine).

3

Verify Installation

Open Command Prompt (search for "cmd" in the Start menu) and type:

python --version

You should see something like Python 3.12.x. If you see an error, try:

python3 --version
4

Verify pip (Python's Package Manager)

In the same Command Prompt, type:

pip --version

You should see a version number and a file path. pip comes bundled with Python and is how we'll install additional libraries.

Trouble? If python isn't recognized, you likely missed the "Add to PATH" checkbox. The easiest fix is to uninstall Python (Settings → Apps), re-download, and re-run the installer — this time checking that box.
1

Download Python

Go to python.org/downloads and click the big yellow "Download Python 3.x.x" button. This will download a .pkg file.

Note: macOS comes with an older version of Python. We need to install the latest version separately — don't rely on the system Python.
2

Run the Installer

Open the downloaded .pkg file and follow the prompts. Click Continue through each step and then Install. You may need to enter your Mac password.

3

Verify Installation

Open Terminal (search for "Terminal" in Spotlight with Cmd+Space) and type:

python3 --version

You should see something like Python 3.12.x.

IMPORTANT: On macOS, always use python3 and pip3 (not python and pip), because python may point to the old system version.
4

Verify pip

In the same Terminal window, type:

pip3 --version
1

Install Python via Package Manager

Most Linux distributions come with Python pre-installed. Open a Terminal and check:

python3 --version

If it's 3.8+ you're good. If not, or if it's missing:

Ubuntu / Debian:

sudo apt update && sudo apt install python3 python3-pip python3-venv

Fedora:

sudo dnf install python3 python3-pip
2

Verify pip

pip3 --version

2. Install Visual Studio Code

VS Code is a free code editor that makes writing Python much easier with features like syntax highlighting, error detection, and a built-in terminal.

1

Download VS Code

Go to code.visualstudio.com and click the blue "Download for Windows" button.

2

Run the Installer

Open the downloaded file and follow the prompts. On the "Select Additional Tasks" screen, check:

  • "Add to PATH" (should be checked by default)
  • "Add 'Open with Code' action to file context menu" (recommended)
  • "Add 'Open with Code' action to directory context menu" (recommended)
1

Download VS Code

Go to code.visualstudio.com and click the blue "Download for Mac" button. Choose the version for your chip (Apple Silicon or Intel).

Which chip do I have? Click the Apple logo → "About This Mac". If it says "Apple M1/M2/M3" choose Apple Silicon. If it says "Intel" choose Intel.
2

Install

Open the downloaded .zip file. Drag Visual Studio Code.app to your Applications folder. Then open it from Applications.

3

Add to PATH

Open VS Code, press Cmd+Shift+P to open the Command Palette, type shell command, and select "Shell Command: Install 'code' command in PATH". This lets you open VS Code from Terminal.

1

Download & Install

Go to code.visualstudio.com and download the .deb (Ubuntu/Debian) or .rpm (Fedora) package.

Ubuntu / Debian:

sudo dpkg -i code_*.deb

Fedora:

sudo rpm -i code_*.rpm

Install the Python Extension

This is required — it adds Python support to VS Code.

1

Open VS Code and click the Extensions icon in the left sidebar (it looks like 4 squares).

2

Search for "Python" and install the one by Microsoft (it should be the first result with millions of downloads).

3

After installing, restart VS Code.

Test Your Setup

1

In VS Code, go to File → New File. Save it as hello.py (the .py extension is important).

2

Type the following code:

print("Hello, AI course!")
3

Click the play button (triangle) in the top-right corner, or right-click and select "Run Python File in Terminal". You should see Hello, AI course! in the terminal at the bottom.

Success! If you see the output, Python and VS Code are working together correctly.

3. Install Git

Git is version control software that tracks changes to your code. We'll start using it in Week 8, but it's good to install early.

1

Download Git

Go to git-scm.com/downloads/win and download the installer.

2

Run the Installer

Open the downloaded file. The default options are fine for every screen — just click Next through each step and then Install.

Tip: When it asks about the default editor, select "Use Visual Studio Code as Git's default editor" if you have VS Code installed already.
3

Verify Installation

Open a new Command Prompt window and type:

git --version
1

Install via Xcode Command Line Tools

The easiest way on Mac. Open Terminal and type:

git --version

If Git isn't installed, macOS will automatically prompt you to install the Xcode Command Line Tools. Click Install and wait for it to finish (this can take a few minutes).

2

Verify

Run git --version again. You should see a version number.

1

Install via Package Manager

Ubuntu / Debian:

sudo apt update && sudo apt install git

Fedora:

sudo dnf install git
2

Verify

git --version

Configure Git (All Operating Systems)

Tell Git who you are. This info appears on your code commits.

1

Set your name (replace with your actual name):

git config --global user.name "Your Name"
2

Set your email:

git config --global user.email "your.email@example.com"

4. Install Python Libraries

We'll install additional packages as we need them throughout the course. Here's how to install them and what we'll use.

How to Install a Library

Open your terminal (Command Prompt on Windows, Terminal on Mac/Linux) and use pip:

pip install library-name
pip3 install library-name

Libraries We'll Use

You don't need to install all of these right now. Install them as we reach each week.

Library What It Does When Needed Install Command
requests Makes HTTP requests to APIs Week 4 pip install requests
python-dotenv Loads API keys from .env files Week 4 pip install python-dotenv
openai OpenAI API client (GPT, DALL-E, etc.) Week 5 pip install openai
anthropic Anthropic API client (Claude) Week 5 pip install anthropic
pandas Data analysis & CSV processing Week 9 pip install pandas
numpy Numerical computing & vectors Week 11 pip install numpy
matplotlib Creating charts & visualizations Week 9 pip install matplotlib
gradio Build simple web interfaces for AI apps Week 15 pip install gradio

Install the First Batch (Weeks 4–5)

When you're ready for Week 4, run this single command to install the initial set of libraries:

pip install requests python-dotenv openai anthropic
pip3 install requests python-dotenv openai anthropic
Getting "Permission denied"? Try adding --user to the end of the command, e.g. pip install requests --user. On Mac/Linux you can also try prefixing with sudo, though --user is preferred.

5. Get Your API Keys

API keys are like passwords that let your programs talk to AI services. You'll need these starting in Week 4.

Keep your API keys secret! Never share them publicly, commit them to Git, or paste them in shared documents. We'll use .env files to keep them safe.

OpenWeatherMap API (Free — Week 4)

1

Go to openweathermap.org/api and click "Sign Up".

2

Create a free account with your email.

3

After confirming your email, go to "API keys" in your account dashboard. You'll see a default key — copy it.

Note: New API keys can take up to 2 hours to activate. Sign up early!

OpenAI API (Week 5+)

1

Go to platform.openai.com and create an account.

2

Navigate to API Keys in the left sidebar and click "Create new secret key".

3

Copy the key immediately — you won't be able to see it again.

Billing: OpenAI's API is pay-per-use. You'll need to add a payment method. For this course, expect to spend roughly $5–15 total. Set a monthly spending limit in Settings → Billing → Usage limits.

Anthropic Claude API (Alternative to OpenAI)

1

Go to console.anthropic.com and create an account.

2

Navigate to API Keys and create a new key.

3

Copy and save the key securely.

Storing Your API Keys Safely

In your project folder, create a file called .env (note the dot at the beginning). Add your keys like this:

OPENWEATHER_API_KEY=your_key_here OPENAI_API_KEY=your_key_here ANTHROPIC_API_KEY=your_key_here

In your Python code, load them like this:

from dotenv import load_dotenv import os load_dotenv() api_key = os.getenv("OPENAI_API_KEY")
Never commit .env files to Git! We'll cover how to set up a .gitignore file in Week 8 to prevent this automatically.

6. Verify Everything Works

Run this quick check to confirm your setup is ready for the course.

1

Create a test file

Open VS Code, create a new file called setup_check.py, and paste the following:

import sys print("=" * 40) print(" AI Course Setup Check") print("=" * 40) print() # Check Python version version = sys.version_info print(f"Python version: {version.major}.{version.minor}.{version.micro}") if version.major == 3 and version.minor >= 8: print(" ✓ Python version is good!") else: print(" ✗ Please install Python 3.8 or newer") print() # Check required libraries libraries = { "requests": "HTTP requests (Week 4)", "dotenv": "Environment variables (Week 4)", } optional_libraries = { "openai": "OpenAI API (Week 5)", "anthropic": "Anthropic API (Week 5)", "pandas": "Data analysis (Week 9)", "numpy": "Numerical computing (Week 11)", "matplotlib": "Visualizations (Week 9)", } print("Required libraries:") for lib, desc in libraries.items(): try: __import__(lib) print(f" ✓ {lib} - {desc}") except ImportError: print(f" ✗ {lib} - {desc} (not installed)") print() print("Optional libraries (install when needed):") for lib, desc in optional_libraries.items(): try: __import__(lib) print(f" ✓ {lib} - {desc}") except ImportError: print(f" - {lib} - {desc} (not yet installed)") print() print("=" * 40) print(" Setup check complete!") print("=" * 40)
2

Run it

Click the play button in VS Code or run from your terminal:

python setup_check.py
python3 setup_check.py
You're all set! If Python version shows ✓ and the required libraries are installed, you're ready for the course. Don't worry about the optional ones yet — we'll install those as we go.