← Course website · Setup and Quarto guide
The failures this course actually produces, with the fix. Read this before emailing — most of what goes wrong here goes wrong for everybody, and the answer is usually one line.
Running cells with 'Python 3.12.x' requires the ipykernel packageVS Code is pointed at a different Python than the one you
installed the packages into. This is the most common first-week
error, and installing ipykernel is usually the
wrong fix — it clears this message and leaves you missing
statsmodels on the next cell.
Point VS Code at the right interpreter instead:
⌘⇧P (macOS) or Ctrl+Shift+P →
Python: Select Interpreter→ pick the environment where you ranpip install.
If you are not sure which that is, run this in the terminal where
pip install worked:
python -c "import sys; print(sys.executable)"That path is the interpreter to select. If you genuinely have only
one Python and want to install into it,
pip install ipykernel is then correct.
ModuleNotFoundError: No module named 'statsmodels'
(or pandas, torch, pymc…)Same cause as above nine times out of ten: the packages went into one Python and you are running another. Check with the command above before installing anything twice.
If the interpreter is right, install everything the course needs in one command, from the top of your clone:
pip install -r requirements.txtFileNotFoundError: Could not find data/processed/m5_weekly.csvThe prepared data is already committed to the course environment repository, so this usually means you are running from the wrong folder rather than that the file is missing.
ls data/processed/ # from the top of your clone — you should see m5_weekly.csv and the other course .csv filesIf they are there, open the repository root in your editor,
not the assignments/ folder. If they are genuinely absent,
rebuild them:
python scripts/prep_m5.py # about 48 MB, a few minutes
python scripts/prep_fred.py
python scripts/prep_electricity.pyimport xgboost fails
on macOSXGBoost needs the OpenMP runtime, which macOS does not ship.
brew install libompOnce, before Week 5. Nothing earlier needs it.
quarto render
fails with a kernel or jupyter errorQuarto runs your Python through a Jupyter kernel even though nothing in your code imports it.
pip install jupyterInto the same interpreter your code runs in — see the first entry above.
That is the whole point of rendering, and it is worth understanding rather than working around. Cells you ran interactively kept variables alive in an order you no longer remember. A render starts from nothing and runs top to bottom.
Before you submit, always:
Restart the kernel, then run everything from the top.
If it survives that, it will render. The single most common
way to lose points in this course is submitting a .qmd that
does not render.
.html is older
than my .qmdYou edited and forgot to re-render.
python scripts/check_my_submission.py catches this
specifically — run it before every submission.
Colab cannot open .qmd files, and this course is built
on them. Use VS Code (with the Quarto extension) or
Positron (Quarto built in). Both are free.
git push →
permission denied / 403Expected. forecasting-env is the
instructor’s repository and you do not have write access to it. It is
your working folder, not your submission.
Submit on Canvas. Upload HWxx.html,
HWxx.qmd, PROMPT_LOG.md and
INITIAL_PROMPT.md (plus REPORT.md where the
assignment asks for one), individually or zipped.
For git pull. When an assignment is corrected during the
term, pulling brings you the fix without re-downloading anything. Local
commits also work perfectly well with nowhere to push to.
Yes, and it is optional. If you do, make your repository private — a fork of a public repository is always public, and a public copy puts your work and your prompt log in front of the whole class.
check_my_submission.py
says “No submissions/ folder found”Run it from the top of your clone, not from inside a subfolder:
cd path/to/forecasting-env
python scripts/check_my_submission.pyIt takes no arguments and finds your folders itself.
Expected, and not graded. Results depend on the random seed, your library versions, your hardware and your thread count. Two people running identical, correct code get different numbers.
Quote your own output, and interpret what you actually got. Tuning toward a number you saw on a slide is the one way to turn this into a wrong answer.
One caveat: the broad ordering of models usually survives. If yours comes out backwards from the lecture, say so in a sentence and offer a reason — either you found something real about your run, or there is a bug worth hunting. Both earn more than quietly reporting a number you do not believe.
That is allowed. The budget is a target, not a limit — log the extra prompts and add a line saying where you got stuck. What costs you is a log that does not match the work you submit.
Post to the course discussion board — if you hit it, someone else did too, and the answer helps them. Include the exact error text, not a description of it, and say what you had already tried.