Skip to main content

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

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-ebook

3. 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 week0

OR

git checkout -b any-name-here

That 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 main

This 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 sync

This 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 preview

quarto 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.

Warning“Jupyter is not available” / Quarto can’t find your kernel

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 jupyter
NoteStuck?

Ask in our Discord channel. A classmate will definitely be able to help you out.