Skip to content

Conversation

@thewtex
Copy link
Member

@thewtex thewtex commented Dec 10, 2025

For:

File /opt/hostedtoolcache/Python/3.10.19/x64/lib/python3.10/site-packages/matplotlib_inline/backend_inline.py:215, in _enable_matplotlib_integration()
211 ip = get_ipython()
213 import matplotlib
--> 215 if matplotlib.version_info >= (3, 10):
216 backend = matplotlib.get_backend(auto_select=False)
217 else:

AttributeError: module 'matplotlib' has no attribute 'version_info'

matplotlib==3.3.1, is an older version that doesn't have the version_info attribute. The matplotlib_inline package (used by Jupyter) is trying to use this attribute which was only added in matplotlib 3.5.0.

The version_info attribute was added in matplotlib 3.5.0, so any version >= 3.5.0 will work with the matplotlib_inline package that Jupyter uses.

For:

File /opt/hostedtoolcache/Python/3.10.19/x64/lib/python3.10/site-packages/matplotlib_inline/backend_inline.py:215, in _enable_matplotlib_integration()
    211 ip = get_ipython()
    213 import matplotlib
--> 215 if matplotlib.__version_info__ >= (3, 10):
    216     backend = matplotlib.get_backend(auto_select=False)
    217 else:

AttributeError: module 'matplotlib' has no attribute '__version_info__'

matplotlib==3.3.1, is an older version that doesn't have the __version_info__ attribute. The matplotlib_inline package (used by Jupyter) is trying to use this attribute which was only added in matplotlib 3.5.0.

The __version_info__ attribute was added in matplotlib 3.5.0, so any version >= 3.5.0 will work with the matplotlib_inline package that Jupyter uses.
Copy link
Collaborator

@N-Dekker N-Dekker left a comment

Choose a reason for hiding this comment

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

Thanks Matt, with this PR, "Build / py-dev / test-linux-notebooks" does pass the CI 👍

@dzenanz
Copy link
Member

dzenanz commented Dec 10, 2025

Merge when the rest of CI finishes 😄

@thewtex thewtex merged commit dfbb541 into main Dec 11, 2025
22 of 24 checks passed
@thewtex thewtex deleted the matplotlib-version-check branch December 11, 2025 13:27
thewtex added a commit that referenced this pull request Dec 15, 2025
And monain and itk-elastix to be consistent with
examples/requirements.txt.

To address binder build where matplotlib fails to build from source.
Similar to #359
Update the matplotlib version so pre-built packages are available.
N-Dekker pushed a commit that referenced this pull request Dec 16, 2025
And monain and itk-elastix to be consistent with
examples/requirements.txt.

To address binder build where matplotlib fails to build from source.
Similar to #359
Update the matplotlib version so pre-built packages are available.
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.

4 participants