Setup Guide: From Zero to Running¶
This guide assumes you have never used a terminal, Git, or Python before. Follow every step and you'll be running code in 15 minutes.
Don't want to install anything?
You can read all chapters and run Python code right now in your browser:
- Read chapters on this website -- no setup needed
- Run code in the Playground -- Python runs in your browser
The instructions below are for people who want to work locally on their computer, which gives you the full experience with Jupyter notebooks.
Step 0: What You Need¶
- A computer (Windows, Mac, or Linux)
- An internet connection
- 15 minutes
That's it. Everything else we'll install together.
Step 1: Install Python¶
Python is the programming language used in every chapter.
- Open your web browser
- Go to python.org/downloads
- Click the big yellow "Download Python 3.x.x" button
- Run the downloaded file
- IMPORTANT: Check the box that says "Add Python to PATH" at the bottom of the installer. This is the most common mistake beginners make.
- Click "Install Now"
- Wait for it to finish, then click "Close"
Don't forget: Add Python to PATH
If you skip this checkbox, nothing else in this guide will work. If you already installed without it, uninstall Python and reinstall with the box checked.
- Open your web browser
- Go to python.org/downloads
- Click "Download Python 3.x.x"
- Open the downloaded
.pkgfile - Follow the installer (click Continue, Agree, Install)
- Done
Verify Python is installed¶
- Press the Windows key on your keyboard
- Type PowerShell
- Click "Windows PowerShell" (the blue icon)
- In the window that opens, type this and press Enter:
You should see something like Python 3.12.3. If you see an error, Python wasn't added to PATH -- reinstall it.
- Press Cmd + Space to open Spotlight
- Type Terminal and press Enter
- In the window that opens, type:
You should see something like Python 3.12.3.
Step 2: Install Git¶
Git lets you download the chapters to your computer.
- Go to git-scm.com/download/win
- The download should start automatically
- Run the installer
- Click Next on every screen (the defaults are fine)
- Click Install, then Finish
Open Terminal and type:
If Git isn't installed, your Mac will ask if you want to install developer tools. Click Install and wait.
Verify Git is installed¶
Close your terminal/PowerShell and open a new one, then type:
You should see something like git version 2.43.0.
Step 3: Download the Chapters¶
Now we'll download all the Berta Chapters to your computer.
- Open PowerShell (press Windows key, type PowerShell, click it)
- Type these commands one at a time, pressing Enter after each:
This creates a folder called berta-chapters on your Desktop.
- Open Terminal
- Type these commands one at a time:
What just happened?
cd Desktop moved you to your Desktop folder. git clone ... downloaded all the chapters from GitHub to your computer. cd berta-chapters moved you into the downloaded folder.
Step 4: Install Dependencies¶
The chapters need some Python libraries to work. Install them all at once:
This takes 1-2 minutes. You'll see a lot of text scrolling by -- that's normal.
Step 5: Open the Chapters¶
You have two options: Jupyter Notebook (classic) or VS Code (modern editor).
Option A: Jupyter Notebook (Recommended for Beginners)¶
Jupyter Notebook opens in your web browser and lets you run code one cell at a time.
Your web browser will open automatically. You'll see a list of files. Click on the notebooks folder, then click 01_introduction.ipynb.
How to use Jupyter Notebook
- Click on a cell (the gray boxes with code) to select it
- Press Shift + Enter to run the selected cell
- The output appears below the cell
- Work through cells from top to bottom
- You can edit the code and re-run cells to experiment
To stop Jupyter, go back to your terminal and press Ctrl + C.
Option B: VS Code (Recommended for Developers)¶
VS Code is a free code editor with built-in Jupyter support.
- Download VS Code from code.visualstudio.com
- Install it (run the downloaded file, click Next until done)
- Open VS Code
- Click File > Open Folder
- Navigate to Desktop > berta-chapters and click Select Folder
- VS Code will ask to install recommended extensions -- click Yes
- In the left sidebar, navigate to
chapters/chapter-01-python-fundamentals/notebooks/ - Click on
01_introduction.ipynb - VS Code will ask to install the Jupyter extension -- click Install
- Click the Run All button at the top, or click the play button next to each cell
Step 6: Start Learning¶
You're set up! Here's what to do now:
- Work through Chapter 1 -- start with
01_introduction.ipynb - Run every code cell -- don't just read, experiment!
- Try the exercises -- in the
exercises/folder - When you finish Chapter 1, move to Chapter 2:
Getting Updates¶
When new chapters are released, get them by running this in the berta-chapters folder:
This downloads any new or updated chapters.
Troubleshooting¶
"python is not recognized" (Windows)¶
Python wasn't added to PATH. Uninstall Python, then reinstall and check the "Add Python to PATH" box.
"pip is not recognized" (Windows)¶
Same fix as above. Reinstall Python with the PATH checkbox.
"jupyter is not recognized"¶
Jupyter didn't install correctly. Try:
"Permission denied"¶
Add --user to pip commands:
Jupyter opens but shows an error in the notebook¶
Make sure you installed the dependencies (Step 4). Go back to the berta-chapters folder and run pip install -r requirements.txt again.
The terminal shows weird characters or colors¶
That's normal -- some tools use colors in the terminal. Everything is working fine.
Nothing works and I'm stuck¶
No worries! You can still learn without any local setup:
- Read chapters on the website -- all content is here
- Use the Playground -- run Python in your browser
- Open a discussion -- ask for help
Quick Reference Card¶
| Task | Windows (PowerShell) | Mac / Linux (Terminal) |
|---|---|---|
| Open terminal | Windows key > type "PowerShell" | Cmd+Space > type "Terminal" |
| Go to Desktop | cd Desktop | cd Desktop |
| Download chapters | git clone https://github.com/luigipascal/berta-chapters.git | same |
| Enter folder | cd berta-chapters | same |
| Install libraries | pip install -r requirements.txt | pip3 install -r requirements.txt |
| Open Chapter 1 | cd chapters\chapter-01-python-fundamentals | cd chapters/chapter-01-python-fundamentals |
| Start Jupyter | jupyter notebook | same |
| Stop Jupyter | Ctrl + C in terminal | same |
| Get updates | git pull | same |
Created by Luigi Pascal Rondanini | Generated by Berta AI