Lecture Cloud
Code exercises for Lecture Cloud — create, manage, test, and submit
assignments directly in VS Code.
Assignment files come from the Lecture Cloud servers — there is no class
repo to clone. Install the extension, sign in, open an assignment, and the
files appear under ~/lecture-cloud/.
Setting up Python (one-time)
Lecture Cloud runs your code against a Python 3.10 grader in the cloud. To
run tests, render notebooks, and debug locally you need a matching Python
3.10 environment on your laptop.
You only need to do this once per laptop. Reopen this guide any time from
the Command Palette: Lecture Cloud: Show Setup Instructions.
We use uv, a single small tool that:
- downloads Python 3.10 for you (no separate Python install)
- creates the virtual environment
- installs the required packages
It works identically on macOS, Windows, Linux, and Chromebook Linux.
1. Install uv
Open a terminal and run the line for your platform.
macOS / Linux / Chromebook
curl -LsSf https://astral.sh/uv/install.sh | sh
Chromebook only: first enable Linux. Go to Settings → Advanced →
Developers → Linux development environment, turn it on, wait for it to
finish, then open the Terminal app it installs.
Windows (PowerShell)
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
Close and reopen your terminal, then confirm:
uv --version
2. Create the Lecture Cloud environment
This creates a Python 3.10 venv at a fixed location (~/lecture-cloud/.venv)
and installs everything the grader uses. Copy the whole block and paste it
into your terminal.
The versions below are pinned to match the cloud grader exactly — please do
not drop the == constraints or substitute newer releases, or your local
results may diverge from what the grader sees.
macOS / Linux / Chromebook
mkdir -p ~/lecture-cloud
cd ~/lecture-cloud
uv venv --python 3.10 .venv
source .venv/bin/activate
uv pip install \
pytest==8.3.4 \
ipykernel==6.29.5 \
numpy==1.26.4 \
pandas==2.2.3 \
scipy==1.13.1 \
scikit-learn==1.5.2 \
snowflake-connector-python==3.12.4 \
matplotlib==3.9.2 \
plotly==5.24.1 \
tabulate==0.9.0
python -m ipykernel install --user --name lecture-cloud \
--display-name "Python (Lecture Cloud)"
Windows (PowerShell)
mkdir $HOME\lecture-cloud -Force
cd $HOME\lecture-cloud
uv venv --python 3.10 .venv
& .\.venv\Scripts\Activate.ps1
uv pip install `
pytest==8.3.4 `
ipykernel==6.29.5 `
numpy==1.26.4 `
pandas==2.2.3 `
scipy==1.13.1 `
scikit-learn==1.5.2 `
snowflake-connector-python==3.12.4 `
matplotlib==3.9.2 `
plotly==5.24.1 `
tabulate==0.9.0
python -m ipykernel install --user --name lecture-cloud `
--display-name "Python (Lecture Cloud)"
This takes 1–3 minutes. When it finishes you'll have:
- a Python 3.10 venv at
~/lecture-cloud/.venv
- all grader packages installed
- a Jupyter kernel named Python (Lecture Cloud) that the assignment
notebooks auto-select
3. Point VS Code at your venv
The first time you open a .py file from an assignment, VS Code asks for a
Python interpreter. Pick the one inside your venv:
- macOS / Linux / Chromebook:
~/lecture-cloud/.venv/bin/python
- Windows:
%USERPROFILE%\lecture-cloud\.venv\Scripts\python.exe
You can change it later with Python: Select Interpreter in the Command
Palette. Notebooks should select Python (Lecture Cloud) automatically.
Useful commands
Open the Command Palette (Cmd/Ctrl + Shift + P) and search for Lecture
Cloud:
- Show Setup Instructions — reopens this guide
- Sign In / Sign Out
- Open Current Assignment
- Submit Assignment
Settings
Configurable from VS Code Settings under Lecture Cloud:
lectureCloud.workspaceRoot — root directory for assignment files
(default ~/lecture-cloud)
lectureCloud.autoSaveDrafts — auto-save drafts to the cloud
lectureCloud.autoSaveDebounceMs — debounce delay for auto-save
- macOS (Intel & Apple Silicon)
- Windows 10 / 11
- Linux
- Chromebook — requires the built-in Linux development environment
Troubleshooting
uv: command not found — close and reopen your terminal. On Windows,
restart VS Code too so it picks up the new PATH.
Chromebook has no "Linux development environment" option — your school
may have disabled it. Use github.dev in the browser as a
fallback, or ask your instructor.
VS Code keeps asking which Python to use — run Python: Select
Interpreter from the Command Palette and pick the path from step 3 above.
Notebook says "Select Kernel" — the ipykernel install step from step 2
didn't run, or ran from a different Python. Re-activate the venv and re-run
just that line.
uv pip install fails on scipy / snowflake-connector-python — these
have native dependencies. On macOS run xcode-select --install. On Linux /
Chromebook run sudo apt install build-essential python3-dev.
Using a different Python
You can point Lecture Cloud at any Python ≥ 3.10 — system Python, conda,
pyenv, another class's venv. Two requirements:
- the packages listed in step 2 must be installed at the exact pinned
versions in that environment
- the
ipykernel install --name lecture-cloud line must be run from inside
it, so notebooks find the right kernel
The grader always runs your submission in its own pinned 3.10 sandbox. Local
Python is just for iterating before you submit.