Skip to content

Pin quantecon_book_networks==1.6 to unblock input_output + networks#777

Merged
mmcky merged 1 commit into
mainfrom
pin-quantecon-book-networks-1.6
Jun 26, 2026
Merged

Pin quantecon_book_networks==1.6 to unblock input_output + networks#777
mmcky merged 1 commit into
mainfrom
pin-quantecon-book-networks-1.6

Conversation

@mmcky

@mmcky mmcky commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Pins quantecon_book_networks==1.6 in the input_output and networks lectures, picking up the upstream pkg_resources fix released today.

Why

Under the anaconda 2026.06 upgrade (#773), input_output.md and networks.md failed to execute because quantecon_book_networks/data.py ran import pkg_resources at module load, and pkg_resources is no longer present on the 2026.06 stack:

ModuleNotFoundError: No module named 'pkg_resources'

quantecon_book_networks 1.6 (published 2026-06-26) migrates data.py off pkg_resources to the stdlib importlib.resources, so the package imports cleanly again. importlib.resources.files is available on all supported Python versions, so 1.6 also works on the current 2025.12 stack — there is no regression on main. This ports the upstream fix from QuantEcon/quantecon_book_networks#21.

Changes

File Before After
lectures/input_output.md !pip install quantecon_book_networks !pip install quantecon_book_networks==1.6
lectures/networks.md !pip install quantecon-book-networks pandas-datareader !pip install quantecon-book-networks==1.6 pandas-datareader

The package is installed via in-cell !pip install rather than environment.yml, so the pin lives in the lecture cells. #775 explicitly called for the fixed version to be pinned here.

Context

This addresses cause 2 of #775 (the quantecon_book_networks / pkg_resources failures). Cause 1 — the pandas 3.0 read-only array in inequality.md — is handled separately in #776. With both merged, a re-run of the "Build Cache" workflow validating the anaconda 2026.06 bump (#773) should go green.

🤖 Generated with Claude Code

quantecon_book_networks 1.6 migrates off the removed `pkg_resources`
module to the stdlib `importlib.resources`, so the package imports again
on the anaconda 2026.06 stack (and remains compatible with 2025.12).

This unblocks the input_output and networks lectures, whose execution
aborted with `ModuleNotFoundError: No module named 'pkg_resources'` under
the 2026.06 upgrade. Picks up the upstream fix from
QuantEcon/quantecon_book_networks#21.

Addresses cause 2 of #775.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings June 26, 2026 10:50
@netlify

netlify Bot commented Jun 26, 2026

Copy link
Copy Markdown

Deploy Preview for taupe-gaufre-c4e660 ready!

Name Link
🔨 Latest commit 1f84150
🔍 Latest deploy log https://app.netlify.com/projects/taupe-gaufre-c4e660/deploys/6a3e596abe80f600086b0d25
😎 Deploy Preview https://deploy-preview-777--taupe-gaufre-c4e660.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Pins quantecon_book_networks / quantecon-book-networks to version 1.6 in the relevant lecture notebooks to avoid pkg_resources import failures after the anaconda 2026.06 upgrade, restoring execution of the affected lectures.

Changes:

  • Pin quantecon_book_networks to ==1.6 in input_output.md.
  • Pin quantecon-book-networks to ==1.6 in networks.md.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
lectures/input_output.md Pins the in-notebook install to ==1.6 to avoid the pkg_resources import issue.
lectures/networks.md Pins the in-notebook install to ==1.6 to avoid the pkg_resources import issue.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread lectures/input_output.md
:tags: [hide-output]

!pip install quantecon_book_networks
!pip install quantecon_book_networks==1.6
@github-actions

github-actions Bot commented Jun 26, 2026

Copy link
Copy Markdown

@github-actions github-actions Bot temporarily deployed to pull request June 26, 2026 10:59 Inactive
@github-actions github-actions Bot temporarily deployed to pull request June 26, 2026 11:00 Inactive
@mmcky mmcky merged commit 7082548 into main Jun 26, 2026
8 checks passed
@mmcky mmcky deleted the pin-quantecon-book-networks-1.6 branch June 26, 2026 11:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants