[house_auction] upgrade prettytable + wcwidth to fix wcwidth.width error#937
Merged
Conversation
prettytable 3.18.0 (2026-06-22) calls wcwidth.width() and requires wcwidth>=0.3.5, but the anaconda base ships wcwidth 0.2.13 (no .width), and `!pip install prettytable` does not upgrade it, so the lecture fails with `AttributeError: module 'wcwidth' has no attribute 'width'` on a full build. Install with `-U prettytable wcwidth` so pip pulls a wcwidth (0.8.1) that exposes .width. Part of #935 (house_auction item; arviz items remain). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the house_auction lecture’s in-notebook dependency installation to avoid a runtime failure introduced by prettytable 3.18.0 when running against older base-Anaconda wcwidth (missing wcwidth.width()), keeping the lecture executable during full builds.
Changes:
- Modify the
house_auctioninstall cell to upgrade/install bothprettytableandwcwidthtogether (!pip install -U prettytable wcwidth).
📖 Netlify Preview Ready!Preview URL: https://pr-937--sunny-cactus-210e3e.netlify.app Commit: 📚 Changed LecturesBuild Info
|
This was referenced Jun 28, 2026
Restore prettytable to latest (>=3.18) in house_auction once base Anaconda ships wcwidth>=0.3.5
#938
Open
mmcky
added a commit
that referenced
this pull request
Jun 28, 2026
…ibility (#939) prettytable 3.18.0 requires wcwidth>=0.3.5 (it calls wcwidth.width()), but base Anaconda 2026.06 ships wcwidth 0.2.14. The in-lecture '!pip install -U wcwidth' from #937 can't fix this: the kernel imports wcwidth at startup, so the already-cached module isn't reloaded by an in-session pip upgrade. Pin prettytable<3.18 (which works with wcwidth 0.2.14) instead. See #938. Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Change
house_auction's install cell from!pip install prettytableto!pip install -U prettytable wcwidth.Why
prettytable3.18.0 (released 2026-06-22) callswcwidth.width()and requireswcwidth>=0.3.5, but the anaconda base shipswcwidth0.2.13, which has no.width. The lecture's!pip install prettytablepulls 3.18.0 without upgradingwcwidth, so the cellprint(PrettyTable)inpresent_dictfails on a full execution:This was surfaced by forced full builds on both anaconda 2025.12 and 2026.06, with the identical error — so it's an upstream
prettytablebreak, independent of the recent anaconda bump (#923).Fix and verification
Adding
-U ... wcwidthmakes pip pull awcwidththat has.width(0.8.1). Verified in an isolated venv —prettytable3.18.0 +wcwidth0.8.1, and aPrettyTablemimickingpresent_dictrenders cleanly. Thepreviewbuild on this PR also re-executeshouse_auction(its source changed), so it exercises the fix directly.Notes
house_auctionitem; the arvizplot_trace(figsize=)items tracked there remain.wcwidthcurrent alongsideprettytable.🤖 Generated with Claude Code