Skip to content

Remove matplotlib upper-version cap to fix backend2gui deprecation - #711

Open
CozySocksAlways wants to merge 2 commits into
NeuralEnsemble:masterfrom
INM-6:fix/remove_mlp_cap
Open

CozySocksAlways wants to merge 2 commits into
NeuralEnsemble:masterfrom
INM-6:fix/remove_mlp_cap

Conversation

@CozySocksAlways

@CozySocksAlways CozySocksAlways commented Aug 18, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Fixes ImportError: cannot import name 'backend2gui' from 'IPython.core.pylabtools', hit during the docs build.

Root cause: matplotlib<3.9.0 relies on IPython's backend2gui/backends dicts to resolve the GUI backend. Those were deprecated in IPython 8.24 (moved into matplotlib itself) and removed in IPython 9.16, so matplotlib<3.9.0 + a current IPython breaks. matplotlib>=3.9.0 already carries the compatibility fix and resolves backends itself, so removing the upper cap (added in #634 as a version at the time pin) fixes the root cause rather than re-pinning around it.

Blocking note

This PR can only be merged once a lower pin is applied on viziphant after it's patch release to PyPI to fix plt.cm.get_cmap, which matplotlib removed in 3.9. Raising matplotlib without a viziphant fix just trades the backend2gui ImportError for an AttributeError in spade.ipynb

  • viziphant#81 is merged, and fix is released to PyPI.
  • lower cap pin on viziphant is applied here

@coveralls

coveralls commented Aug 18, 2026 •

Copy link
Copy Markdown
Collaborator

Coverage Status

coverage: 88.234%. remained the same — INM-6:fix/remove_mlp_cap into NeuralEnsemble:master

@CozySocksAlways CozySocksAlways added this to the v1.3.0 milestone Nov 2, 2026
@CozySocksAlways CozySocksAlways self-assigned this Nov 2, 2026
@CozySocksAlways
CozySocksAlways marked this pull request as ready for review November 26, 2026 08:14
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