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

Incompatibility with latest matplotlib #383

Closed
grst opened this issue May 16, 2024 · 2 comments · Fixed by #384
Closed

Incompatibility with latest matplotlib #383

grst opened this issue May 16, 2024 · 2 comments · Fixed by #384
Labels
bug Something isn't working

Comments

@grst
Copy link
Contributor

grst commented May 16, 2024

Description of the bug

This happens in a fresh conda environment with python 3.9 and right after pip install sc-dandelion.
I've seen the error before and it seems to be related to changes in matplotlib.

(test_dandelion) sturm@hochvogel scirpy [fix-cpu-count] % python -c "import dandelion"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/sturm/apps/micromamba/envs/test_dandelion/lib/python3.9/site-packages/dandelion/__init__.py", line 5, in <module>
    from dandelion import plotting as pl
  File "/home/sturm/apps/micromamba/envs/test_dandelion/lib/python3.9/site-packages/dandelion/plotting/__init__.py", line 2, in <module>
    from dandelion.plotting._plotting import (
  File "/home/sturm/apps/micromamba/envs/test_dandelion/lib/python3.9/site-packages/dandelion/plotting/_plotting.py", line 31, in <module>
    import dandelion.external.nxviz as nxv
  File "/home/sturm/apps/micromamba/envs/test_dandelion/lib/python3.9/site-packages/dandelion/external/nxviz/__init__.py", line 3, in <module>
    from .api import (
  File "/home/sturm/apps/micromamba/envs/test_dandelion/lib/python3.9/site-packages/dandelion/external/nxviz/api.py", line 10, in <module>
    from dandelion.external.nxviz import edges, nodes
  File "/home/sturm/apps/micromamba/envs/test_dandelion/lib/python3.9/site-packages/dandelion/external/nxviz/edges.py", line 17, in <module>
    from dandelion.external.nxviz import encodings, lines
  File "/home/sturm/apps/micromamba/envs/test_dandelion/lib/python3.9/site-packages/dandelion/external/nxviz/encodings.py", line 10, in <module>
    from matplotlib.cm import get_cmap
ImportError: cannot import name 'get_cmap' from 'matplotlib.cm' (/home/sturm/apps/micromamba/envs/test_dandelion/lib/python3.9/site-packages/matplotlib/cm.py)

Minimal reproducible example

No response

The error message produced by the code above

No response

OS information

No response

Version information

No response

Additional context

No response

@grst grst added the bug Something isn't working label May 16, 2024
@zktuong
Copy link
Owner

zktuong commented May 16, 2024

thanks @grst !

Indeed : https://matplotlib.org/stable/api/prev_api_changes/api_changes_3.9.0.html#removals

will try and do a quick fix to see which of those work.

@zktuong zktuong linked a pull request May 16, 2024 that will close this issue
@grst
Copy link
Contributor Author

grst commented May 17, 2024

Thanks for fixing this so quickly :)

Allow me one comment regarding version numbers (assuming you follow semver):

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants