Seven tools over seven labs, in the order you use them when you start a project. Nothing new today: one slide each, then you use all seven at once. Click a tile to open the original session.
The same computer, driven by typing. Terminal on a Mac, PowerShell on Windows. Every other tool today starts here.
pwd # where am I? ls # what is here? mkdir bio-python # make a folder cd bio-python # go into it cd .. # one folder up
One tool installs Python, runs your files and, later, manages your packages. If a command is not found after installing, close and reopen the terminal.
uv python install 3.14 uv run python --version # Python 3.14.x uv run python # the >>> prompt; exit() to leave uv run translate_bee.py # run a program
Write and run in one window. Lab 3 set it up; Lab 6 made it yours.
File → Open Folder never a lone file ⌘⇧P / Ctrl+Shift+P find any command → Python: Select Interpreter ⌘, / Ctrl+, settings Ctrl+` open the terminal ⌥Z / Alt+Z wrap long lines
Colab hid this from you: on your laptop, every package has to be installed. Each project gets its own, in its own folder.
uv tool install uv-start # once per laptop uv-start lab08 --data # a new project folder cd lab08 uv add scipy # add a package uv sync # rebuild .venv from the lock
Two ways to write Python. Both run with the same packages, from the same .venv.
uv run count_trials.py
A lab notebook for code: every working state saved, with a note saying why. Commit when something works.
git status # when lost, type it git add . git commit -m "why, not what" git log --oneline # the history git restore analysis.py # back to the last commit git push # copy commits to GitHub
Run today's two notebooks on your own laptop, as a project under git. Every step uses a tool from the last seven labs. Windows: type curl.exe instead of curl.
cd bio-python uv-start lab08 --data cd lab08 uv add scipy curl -O https://raw.githubusercontent.com/HocheggerLab/y3-bio-python/main/lab08/01_quicker_figures.ipynb curl -O https://raw.githubusercontent.com/HocheggerLab/y3-bio-python/main/lab08/02_real_or_chance.ipynb code .
Done when the notebook runs in VS Code and git log --oneline shows your commit.
Seven messages cover most of what goes wrong. Read the last line of the error first.