Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ImportError: cannot import name 'get_cmap' from 'matplotlib.cm' #234

Closed
realchandan opened this issue May 21, 2024 · 5 comments
Closed

ImportError: cannot import name 'get_cmap' from 'matplotlib.cm' #234

realchandan opened this issue May 21, 2024 · 5 comments
Labels
bug Something isn't working ops Improvements to the project that don't impact the code
Milestone

Comments

@realchandan
Copy link

Everytime I try to run diart.stream -h

I get ImportError: cannot import name 'get_cmap' from 'matplotlib.cm'

Which is coming from pyannote/core/notebook.py, line 129

I tried installing without conda, with conda and even building docker image from the Dockerfile here

But I still get ImportError: cannot import name 'get_cmap' from 'matplotlib.cm' (/opt/venv/lib/python3.11/site-packages/matplotlib/cm.py)

I think some recent dependency change broke this whole thing.

@realchandan
Copy link
Author

Update: It works for matplotlib==3.8.0 but doesn't work for 3.9.0

@juanmc2005 juanmc2005 added bug Something isn't working ops Improvements to the project that don't impact the code labels May 21, 2024
@juanmc2005 juanmc2005 added this to the Version 0.10 milestone May 21, 2024
@juanmc2005
Copy link
Owner

Hi @realchandan thank you for reporting this! I'll address the compatibility issue for the next release

@plischwe
Copy link

I tried 3.8 and that doesn't seem to work. I noticed the traditional cmap functionality works until 3.5.0, I see a deprecation notice in the 3.6.0 release.

@juanmc2005
Copy link
Owner

After some digging, it looks like this is coming from pyannote.core. It looks like the error was fixed but never released.
I just opened an issue to ask for a new release with the fix: pyannote/pyannote-core#100

@juanmc2005
Copy link
Owner

I just merged this fix as part of PR #237. Until v0.10 is released, this problem can be solved by installing matplotlib 3.5.x as mentioned above

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working ops Improvements to the project that don't impact the code
Projects
None yet
Development

No branches or pull requests

3 participants