Setting Up Your Environment

Getting your computer ready for notebooks, code, GIS, and lab work on Windows, macOS, Linux, and Raspberry Pi

Before You Start

You should know
That you do not need a perfect or expensive setup to begin.

You will learn
What a beginner-safe starter environment looks like, why virtual environments matter, and how to build a stable workflow on Windows, macOS, Linux, or Raspberry Pi.

Why this matters
Many beginners lose momentum because their computer setup feels mysterious. A good learning environment should be boring, recoverable, and easy to understand.

If this gets hard, focus on…
Getting one editor, one Python installation, one terminal, and one project folder working cleanly. That is enough to start.

This book is designed so that much of the learning can happen directly on the page. You can read, think, and often experiment without a complicated local setup.

But some labs and companion projects work better when you have your own environment ready:

  • a place to write and run code
  • a terminal
  • a text editor
  • a notebook workflow
  • a safe way to install packages

The goal is not to make your machine impressive. The goal is to make it stable.

Starter Stack

A Good Learning Environment Is Small, Boring, And Recoverable

The important mental model is not “install everything.” It is one stable workflow: browser for reading, editor for files, terminal for commands, Python inside a project environment, and optional heavier tools only when they are actually needed.

Read and inspect

Browser + project folder

Keep one clear place where the work lives and one browser where the book and docs stay open.

Edit and run

Editor + terminal

Use the editor for files and the terminal for a small set of predictable commands.

Keep it isolated

Python + virtual environment

Install packages inside the project environment so experiments stay local and easy to repair.

Always needed

Browser, editor, terminal, Python, Git

This is enough for most reading, notebooks, and early companion work.

Add later

JupyterLab and QGIS

Bring in heavier tools when the work actually asks for notebooks or desktop GIS.

Main rule

Prefer recoverable over clever

A simple setup you understand is better than a complicated one you cannot repair.

The aim is a learning environment that stays legible under stress: one project, one environment, one boring path to recovery.

1. What You Actually Need

For most readers, a good starter setup includes:

  • a modern web browser
  • a code editor
  • Python 3
  • Git
  • a terminal
  • JupyterLab

If you move further into spatial work, it is also useful to have:

  • a virtual environment workflow
  • a package manager
  • optional GIS software such as QGIS

2. The Most Important Rule

Avoid installing everything globally if you can.

Instead, aim for:

  • one clean base Python installation
  • one project folder per lab or project
  • one virtual environment per project when needed

That makes it much easier to recover when something breaks.

4. Platform Notes

Windows

Recommended order:

  1. Install VS Code
  2. Install Git for Windows
  3. Install Python 3 from the official Python site
  4. Make sure Python is added to PATH
  5. Install JupyterLab
  6. Optionally install QGIS

Check Python:

python --version

or, on some systems:

py --version

Create a virtual environment inside a project folder:

python -m venv .venv

Activate it in PowerShell:

.\.venv\Scripts\Activate.ps1

Then install JupyterLab:

python -m pip install jupyterlab

Common beginner problems on Windows:

  • multiple Python versions
  • python not on PATH
  • packages installed globally and forgotten

If things get messy, a clean reinstall plus a fresh virtual environment is often faster than endless debugging.

macOS

Recommended order:

  1. Install VS Code
  2. Install Homebrew
  3. Install Git if it is not already present
  4. Install Python 3
  5. Install JupyterLab
  6. Optionally install QGIS

Check Git:

git --version

Check Python:

python3 --version

Create and activate a virtual environment:

python3 -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
python -m pip install jupyterlab

Do not depend on the old system Python for learning projects. It is better to use your own install and your own environments.

Linux

Linux is often the easiest platform for reproducible technical work once you become comfortable with the terminal.

Typical needs:

  • git
  • python3
  • python3-venv
  • pip
  • an editor

On Debian or Ubuntu style systems:

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

Then:

python3 -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
python -m pip install jupyterlab

Package names vary by distribution, but the overall pattern is the same.

Raspberry Pi

A Raspberry Pi can be an excellent learning machine.

It is great for:

  • Python basics
  • notebooks
  • small simulations
  • simple data analysis
  • sensor experiments

It is less ideal for:

  • large remote-sensing datasets
  • heavy GIS processing
  • large machine-learning workloads

A practical Pi setup:

  1. Use a current Raspberry Pi OS
  2. Update the system
  3. Install Python tools, Git, and Jupyter
  4. Start with lightweight projects
  5. Keep memory and storage limits in mind
sudo apt update
sudo apt upgrade -y
sudo apt install python3 python3-venv python3-pip git
python3 -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
python -m pip install jupyterlab

5. Folder Structure

A simple project structure helps a lot.

geography-work/
├── notes/
├── labs/
│   ├── lab-01/
│   ├── lab-02/
│   └── ...
├── data/
└── scratch/

Within one lab:

lab-01/
├── README.md
├── notebooks/
├── data/
├── outputs/
└── .venv/

This helps separate source work, input data, outputs, and environment files.

6. What To Install First

If you are trying not to overwhelm yourself, install in this order:

  1. browser
  2. code editor
  3. Python
  4. Git
  5. virtual environment support
  6. JupyterLab
  7. optional GIS tools

That is enough to begin.

7. Sanity Check

Before starting labs, make sure these work:

git --version
python --version

or, where needed:

python3 --version

Then try:

python -m pip --version

and:

jupyter lab

If those work, your environment is in good shape.

If This Gets Hard, Focus On

  • one editor
  • one Python install you understand
  • one virtual environment per project
  • one terminal you are willing to practice with

A clean, boring setup is better than an advanced, confusing one.