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

Matplotlib 3.9 broken dependency #520

Closed
nvaulin opened this issue May 28, 2024 · 3 comments
Closed

Matplotlib 3.9 broken dependency #520

nvaulin opened this issue May 28, 2024 · 3 comments

Comments

@nvaulin
Copy link

nvaulin commented May 28, 2024

Hi, I found that in new version of matplotlib (3.9) there are some functions being removed.

For instance, for

import cooltools.lib.plotting

I've got:

----> 5 from matplotlib.cm import register_cmap
      6 import matplotlib as mpl
      7 import matplotlib.pyplot as plt

ImportError: cannot import name 'register_cmap' from 'matplotlib.cm' (/home/nvaulin/tools/mambaforge/envs/hic-env/lib/python3.10/site-packages/matplotlib/cm.py)

This function was present in 3.8, but not in 3.9 (https://matplotlib.org/3.8.4/api/cm_api.html#matplotlib.cm.register_cmap
)

So maybe you could add specific version of matplotlib to the requirements.txt, or adjust the code

@nvaulin nvaulin changed the title Matplotlib broken dependency Matplotlib 3.9 broken dependency May 28, 2024
@nvaulin
Copy link
Author

nvaulin commented May 30, 2024

https://matplotlib.org/stable/api/prev_api_changes/api_changes_3.9.0.html#removals
New function to use: https://matplotlib.org/stable/api/cm_api.html#matplotlib.cm.ColormapRegistry.register

Yes, I mean, this removed func you mentioned is used In 'cooltools.lib.plotting' module.

@golobor
Copy link
Member

golobor commented Aug 9, 2024

must be finally solved by #533. Feel free to reopen if the issue appears again!

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

No branches or pull requests

3 participants