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.
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.
Browser + project folder
Keep one clear place where the work lives and one browser where the book and docs stay open.
Editor + terminal
Use the editor for files and the terminal for a small set of predictable commands.
Python + virtual environment
Install packages inside the project environment so experiments stay local and easy to repair.
Browser, editor, terminal, Python, Git
This is enough for most reading, notebooks, and early companion work.
JupyterLab and QGIS
Bring in heavier tools when the work actually asks for notebooks or desktop GIS.
Prefer recoverable over clever
A simple setup you understand is better than a complicated one you cannot repair.
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.
3. Recommended Starter Stack
If you want the short version, this is a practical beginner stack:
- browser: Firefox or Chrome
- editor: VS Code
- Python: current stable Python 3
- Git: current stable Git
- notebooks: JupyterLab
- optional GIS: QGIS
This is not the only good stack. It is simply one with low friction and strong documentation.
4. Platform Notes
Windows
Recommended order:
- Install
VS Code - Install
Git for Windows - Install
Python 3from the official Python site - Make sure Python is added to
PATH - Install
JupyterLab - Optionally install
QGIS
Check Python:
python --versionor, on some systems:
py --versionCreate a virtual environment inside a project folder:
python -m venv .venvActivate it in PowerShell:
.\.venv\Scripts\Activate.ps1Then install JupyterLab:
python -m pip install jupyterlabCommon beginner problems on Windows:
- multiple Python versions
pythonnot onPATH- 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:
- Install
VS Code - Install
Homebrew - Install
Gitif it is not already present - Install
Python 3 - Install
JupyterLab - Optionally install
QGIS
Check Git:
git --versionCheck Python:
python3 --versionCreate and activate a virtual environment:
python3 -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
python -m pip install jupyterlabDo 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:
gitpython3python3-venvpip- an editor
On Debian or Ubuntu style systems:
sudo apt update
sudo apt install python3 python3-venv python3-pip gitThen:
python3 -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
python -m pip install jupyterlabPackage 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:
- Use a current Raspberry Pi OS
- Update the system
- Install Python tools, Git, and Jupyter
- Start with lightweight projects
- 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 jupyterlab5. 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:
- browser
- code editor
- Python
- Git
- virtual environment support
- JupyterLab
- optional GIS tools
That is enough to begin.
7. Sanity Check
Before starting labs, make sure these work:
git --versionpython --versionor, where needed:
python3 --versionThen try:
python -m pip --versionand:
jupyter labIf 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.