Standard Set Up
Make sure you follow this guide before you start exploring the bootcamp. It shows you how to set up the Python environment correctly and reproduce the results on your own computer.
1. Prerequisites
- Git — https://git-scm.com/downloads
- uv (Python package/version manager) — https://docs.astral.sh/uv/getting-started/installation/
- VS Code (recommended editor, with the Python + Jupyter extensions) — https://code.visualstudio.com/download
- Quarto — (optional, only if you want to preview the site itself, not just run notebooks) https://quarto.org/docs/get-started/
- PostgreSQL + PostGIS — (optional, only needed once we start working with a spatial database)
Remember to run uv sync to install the libraries we use throughout our sessions.
2. Clone the repository
git clone https://github.com/emanuel-gf/spacetech-gis-ebook.git
cd spacetech-gis-ebook3. Create your own branch
This repository is updated every week. If you change files directly on the main branch, you will have some trouble pulling the new chapters as they are released (git pull). So we suggest you create your own branch and make your changes there, always keeping main clean.
git checkout -b week0OR
git checkout -b any-name-hereThat way, whenever the repository is updated, you just go to the main branch and run git pull.
git checkout main
git pull
git checkout my-work
git merge mainThis keeps main clean and isolated, saving you headaches in the not-so-distant future.
4. Sync the Python libraries
First make sure you have a uv environment (created with uv venv) and that it is activated.
uv syncThis reads pyproject.toml / uv.lock and creates a local .venv with the exact package versions used in class (geopandas, cartopy, plotly, etc).
5. Done!
You can now run the notebooks: open one, select the kernel, and everything will work like magic.
6. Rebuilding the website with Quarto
This one is for those who want to explore Quarto’s features a bit more. First, have a read of the documentation. Then, inside the project, run this in the terminal:
uv run quarto previewquarto preview shows the Portuguese site. To preview the English one, run uv run python scripts/babel.py preview en, and to build both editions (Portuguese in _site/, English in _site/en/) run uv run python scripts/babel.py render.
Quarto sometimes finds a system Python instead of the one uv just created in .venv. If quarto check jupyter reports no Jupyter, point Quarto at the venv explicitly:
export QUARTO_PYTHON=$(pwd)/.venv/bin/python
quarto check jupyterAsk in our Discord channel. A classmate will definitely be able to help you out.