Upgrade matplotlib installation issues

Hi, I recently tried to upgrade Matplotlib in my terminal via pip install --upgrade matplotlib. However, it resulted in errors when I’m simply trying to import matplotlib.pyplot. I uninstalled and installed several times but I still get errors when I import matplotlib.pyplot.

AttributeError: type object ‘Axis’ has no attribute ‘_set_ticklabels’

For context, the Python interpreter is 3.10.6 and I am using Windows 10.

That method was removed in PR 24577 and was private internal functionality. We do not use it internally, so there must be something calling that directly elsewhere, but no idea where based on what you have posted here.