ENCN205 · GIS Component · Week 8 · Online, self-paced

Lab 0: Setting Up Jupyter, Python & GeoPandas

University of Canterbury · Te Whare Wānanga o Waitaha

Time: 30–45 minutes  ·  Assessment: ungraded, but a sign-off must be submitted  ·  Deadline: before Lab 1 (Week 9)

Labs 1–4 of the GIS component are assessed and all run in Python/Jupyter. Lab 0 gets your computer ready so that in Lab 1 you spend your time doing GIS, not fixing installations. Work through the six steps below, in order. If anything goes wrong, the Troubleshooting table covers the common problems.

Using your own laptop is recommended — you'll want the same setup for the labs, the assignment work, and later courses. Any Windows, macOS, or Linux machine from the last ~8 years is fine.

1Install Miniforge (or Anaconda)

The labs use conda to manage Python and its geospatial libraries. Two ways to get it — pick one:

Miniforge (recommended)Anaconda
Get it conda-forge.org/download anaconda.com/download
SizeSmall (~100 MB), installs fastLarge (~4 GB), includes lots you won't use
Good ifYou just want the course workingYou already have it installed — no need to switch

Run the installer with the default options. On Windows, when it finishes you'll have a new Start-menu entry called Miniforge Prompt (or Anaconda Prompt) — that's the terminal you'll use in the next step. On macOS/Linux, use the normal Terminal.

If you already have Anaconda or Miniconda installed from another course, skip the installer and go straight to Step 2.

2Create the ENCN205 environment

An environment is a self-contained set of packages — it keeps this course's libraries from interfering with anything else on your machine. Open your Miniforge/Anaconda Prompt (Windows) or Terminal (macOS/Linux) and paste this single command:

conda create -n encn205 -c conda-forge python=3.12 geopandas fiona folium geodatasets mapclassify matplotlib jupyterlab

Press y when asked to proceed. This downloads ~500 MB and takes a few minutes — a good moment to make a cup of tea. When it finishes, activate it:

conda activate encn205

Your prompt should now start with (encn205).

3Launch JupyterLab

With the environment active, start JupyterLab:

jupyter lab

Your web browser will open a page that looks like a file manager with an orange logo — that's JupyterLab, the tool you'll use for every lab. (To stop it later, close the browser tab and press Ctrl+C in the terminal.)

Every time you work on ENCN205, the routine is the same two commands: conda activate encn205 then jupyter lab.

4Download and run the Lab 0 notebook

  1. Download Lab0_Setup.ipynb from LEARN.
  2. Save it somewhere sensible — e.g. create a folder Documents\ENCN205 and keep all your lab files there.
  3. In JupyterLab, use the file browser (left panel) to navigate to that folder and double-click Lab0_Setup.ipynb.
  4. Work through it from the top — it teaches you how notebooks work, checks your installation, and makes your first map.

5Confirm you're ready

The final cell of the notebook runs a readiness check. You're done when you see:

🎉  YOU ARE READY FOR LAB 1  🎉

If you got the banner, your environment is working. One short step to go.

6Complete the sign-off and submit it

Lab 0 is ungraded, but you do need to record that your setup is working — this is how we know you're ready before the assessed labs start.

  1. Download Lab0_SignOff.html from LEARN and open it in your web browser.
  2. Enter your full name and University ID, then answer the 5 questions about what you did in Lab 0.
  3. You need 4 out of 5 to pass. You can retake it as often as you like — each attempt draws a new set of questions, and every answer comes with an explanation.
  4. When you pass, click Download Sign-Off PNG. This saves a file called ENCN205_Lab0_<yourID>.png.
  5. Upload that PNG to the Lab 0 Sign-Off submission on LEARN.
The PNG records your name, ID, score, and a timestamp inside the QR code. It's your proof of completion — show it to your tutor if they ask. Every lab in this course finishes the same way, so it's worth getting familiar with the routine now.

Troubleshooting

SymptomFix
'conda' is not recognized… (Windows) You're in the wrong terminal. Use the Miniforge Prompt / Anaconda Prompt from the Start menu, not plain Command Prompt or PowerShell.
conda create hangs on "Solving environment" for many minutes Most likely you're on old Anaconda. Either install Miniforge instead (Step 1), or run conda update -n base conda and conda config --set solver libmamba, then retry.
ImportError / ❌ next to a package in the notebook check With the environment active, run conda install -c conda-forge <package-name>, then restart the notebook kernel (Kernel → Restart) and re-run.
Packages are installed but the notebook still can't import them JupyterLab is probably running from the wrong environment. Close it, then make sure you run conda activate encn205 before jupyter lab.
Download/install fails on campus Wi-Fi with an SSL or proxy error Try again on a different network (e.g. at home or a hotspot), or ask a tutor — this is a network issue, not a you issue.
The map in Section 3 doesn't appear Make sure you ran the cells above it first (Run → Run All Cells is the easy way).
Mac with Apple Silicon (M1–M4) Fully supported — just make sure you downloaded the Apple Silicon installer in Step 1.
Still stuck? Post the exact error message (a screenshot is perfect) on the course LEARN forum, or bring your laptop to your first lab session — tutors will help you get running before any assessed work starts.