The repo organization of packages is often confusing for some of us. Following some other online suggestions relating to this problem, I tried enabling the powertools repo for installing matplotlib, but that didn’t help. The crb repo solved the problem.
I suppose it might be useful if package managers such as dnf would suggest an appropriate repo when dnf fails to use currently enabled repos for an installation request.
RHEL 8 and 9 do have CodeReady Linux Builder (CRB) repository. Its apparent idea is to provide tools for building (RPM) packages. As such, CRB should not be necessary on “production system” and is disabled by default. Alas, some packages, particularly in EPEL (which is “third party”) get dependency on CRB packages, rather than having the functionality in them.
The “CodeReady Linux Builder” is a Red Hat’s trademark – a name that cannot be used by other distros. CentOS Linux 8 did work around that by choosing name powertools. That is why guides for CentOS 8, AlmaLinux 8, etc, do mention powertools. By release of RHEL 9 lawyers figured out that name like “crb” is ok too. That is why AlmaLinux 9 (and Rocky Linux 9, etc) do have crb rather than powertools.
A followup problem related to using matplotlib on almalinux-9.3 workstation is that the matplotlib basemap toolkit (for geographical map plotting) appears to be unavailable, or perhaps it is just hiding in yet another non-enabled by default repo.