Codespace Terminal Procedures -- starting Python, uv, venv, installing dependencies¶
Step 0 -- This will make your flask app run (but do this after the other steps)¶
In codespace, the following command will fire up a link that you click on to see your flask app front page.
uv run flask run --host=0.0.0.0 --port=5000
🧭 Step 1 — Install Python (Codespaces base image doesn’t include it)¶
Run
sudo apt-get update
sudo apt-get install -y python3 python3-venv python3-pip
python3 --version
Python 3.12.x
🧭 Step 2 — Install uv (fresh Codespaces never includes it)¶
Install uv:
curl -LsSf https://astral.sh/uv/install.sh | sh
source ~/.profile
uv --version
🧭 Step 3 — Create your virtual environment¶
Your script is correct: it expects .venv to exist.
Create it:
uv venv
source .venv/bin/activate
python --version
which python
.venv/bin/python.
🧭 Step 4 — Sync dependencies¶
Now install everything from your pyproject.toml:
uv sync
🧭 Step 5 — Run your dev-start script again¶
./scripts/dev-start.sh
Remember¶
A fresh Codespace:
- does not include Python
- does not include uv
- does not include your .venv
- does not preserve executable bits on scripts
Your workflow is correct — the environment just needed to be rebuilt.