Skip to content

anaconda 2026.06: Build Cache fails — 3 notebooks (pandas 3.0 read-only + quantecon_book_networks pkg_resources) #775

Description

@mmcky

Validating the anaconda=2025.12 → 2026.06 upgrade (#773) with a cache.yml "Build Cache" run dispatched on the branch. The -W --keep-going build fails (build finished with problems, 19 warnings): https://github.com/QuantEcon/lecture-python-intro/actions/runs/28221751009. Three notebooks fail to execute, from two distinct root causes. The undefined label warnings in the log (lorenz_gini, us_15sectors, financial_network, …) are downstream fallout from cells that never ran, not separate problems.

Lecture Root cause Fix owner
inequality.md pandas 3.0 read-only array this repo (lecture edit)
input_output.md quantecon_book_networks imports removed pkg_resources upstream package
networks.md same as input_output.md upstream package

1. pandas 3.0 read-only arrays — inequality.md. Under pandas 3.0 Copy-on-Write, np.asarray() of a Series returns a non-writeable array, so the in-place shuffle raises:

Cell In[7], line 25
---> 25  rd.shuffle(y)        # y = np.asarray(df[df['year']==year][var].repeat(counts))
ValueError: assignment destination is read-only

This is fixable here: take a writeable copy, e.g. y = np.asarray(y).copy() (or y = np.array(y)).

2. quantecon_book_networks imports removed pkg_resourcesinput_output.md, networks.md.

File .../site-packages/quantecon_book_networks/data.py:1
----> 1 import pkg_resources
ModuleNotFoundError: No module named 'pkg_resources'

This is an upstream package bug, tracked at QuantEcon/quantecon-book-networks#21. These two lectures stay broken until a fixed quantecon_book_networks is released and pinned here; the short-term stopgap is adding setuptools to environment.yml to restore pkg_resources.

Status. #773 is not mergeable yet. It needs (1) the inequality.md copy fix, and (2) the upstream quantecon_book_networks fix released and pinned (or the setuptools stopgap). Found during the cross-repo anaconda 2026.06 validation sweep.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions