mwaskom / seaborn

Statistical data visualization in Python
https://seaborn.pydata.org
BSD 3-Clause "New" or "Revised" License
12.62k stars 1.94k forks source link

AttributeError: module 'matplotlib.cm' has no attribute 'register_cmap' #3711

Closed Shravan-aero closed 5 months ago

Shravan-aero commented 5 months ago

I ran Seaborn earlier, and it was working well. After a month, I ran the same code, which showed the following error: AttributeError: module 'matplotlib.cm' has no attribute 'register_cmap'. I try installing the Seaborn package and some more updates. It's not working with the same error. The error occurs explicitly while importing the seaborn library, not for matplotlib (matplot is working for other codes), but the same error occurs for another library (i.e. pingouin, etc.).

Capture

mwaskom commented 5 months ago

Looks like you are not using the latest version of seaborn, which handles this API change in matplotlib: https://github.com/mwaskom/seaborn/blob/master/seaborn/_compat.py#L67