Skip to content

0.2 Environment Setup

Minimal AI course setup kit

Install less first. The goal is only: enter one folder, run Python, save code with Git, and keep enough evidence that another person can rerun your work.

In job-facing AI work, environment setup is not a side chore. It is the first proof that your project can move from your laptop to another reviewer, teammate, or deployment target.

ToolUse
BrowserCourse, Colab, GitHub, AI tools
VS CodeEdit files
Python 3.11Run examples
GitSave checkpoints

Install Docker, CUDA, vector databases, and large frameworks later. Installing too much too early makes beginner errors harder to locate.

Different machines use different Python launchers. Pick the first command that works and keep using it in your notes.

SystemTry firstIf that fails
macOS / Linuxpython3 --versionpython --version
Windows PowerShellpy -3.11 --versionpython --version
Colabno install neededuse the notebook runtime

When a later command says python, replace it with the command that worked on your machine.

Terminal window
python3 --version
git --version
mkdir ai-learning-lab
cd ai-learning-lab
python3 -m venv .venv
source .venv/bin/activate
python -c "print('AI course environment is ready')"
git init
git status

Windows PowerShell activation:

Terminal window
py -3.11 -m venv .venv
.\.venv\Scripts\Activate.ps1

Expected signal:

AI course environment is ready
Initialized empty Git repository ...

git status should show that you are inside a repository. You do not need to commit yet; the point is to confirm that the folder is ready to track work.

SymptomDo this firstKeep as evidence
python3 not foundTry the command table above, then install Python 3.11The command and full error
virtual environment activation failsCheck your shell: zsh/bash uses source, PowerShell uses Activate.ps1Shell name and activation command
git not foundInstall Git, reopen the terminal, retry git --versionVersion output or error
permission errorMove the project under your user folder, not a protected system folderCurrent directory from pwd

If this still fails, use Colab for now and return after Chapter 1. The pass line is simple: enter a folder, run Python, initialize Git.

If you already have a setup, do not skip the page completely. Confirm that you can explain:

  • Which interpreter runs this course project.
  • Where dependencies will be installed.
  • How you will recreate the environment on another machine.
  • Which files should be committed and which should stay local.

The environment is part of the course output. A project that only works on your laptop is not finished yet. A stronger project has a short setup section, a known Python version, a dependency plan, and one command that proves the basic runtime works.

Keep this page’s proof of learning as a small evidence card:

Machine State
OS, Python/Node versions, editor, terminal, and package manager
Verification
commands run, versions printed, and first script output
Debug Note
install error, path issue, permission issue, or environment mismatch
Recovery Plan
exact command or doc page to retry before moving on
Expected Output
reproducible project folder with successful command output and one known fallback

You pass this setup page when the same folder can run Python, show Git status, and explain which interpreter owns the project.