Skip to content

cooltools 0.7.1 'from matplotlib.cm import register_cmap' & 'from matplotlib.colormaps import register' import errors (solved by downgrading matplotlib) #549

Description

@guoyun-chen

I was running cooltools in my conda virtual environment, where I installed cooltools 0.7.1 via pip and matplotlib 3.10 via conda

I ran into such error messages:

ImportError
----> 6 from matplotlib.cm import register_cmap
ImportError: cannot import name 'register_cmap' from 'matplotlib.cm' (/home/cheng/miniconda3/envs/rotation/lib/python3.10/site-packages/matplotlib/cm.py)

ModuleNotFoundError
----> 8 from matplotlib.colormaps import register
ModuleNotFoundError: No module named 'matplotlib.colormaps'

Modifications I did:

I downgraded the matplotlib in my environment from 3.10 to 3.7 and the code is working now

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions