Skip to content

Conversation

@n-poulsen
Copy link
Contributor

Addresses issue #2581. Replicated in Google Colab and locally. We use this method in many functions

With matplotlib==3.8.4:

>>> import matplotlib as mpl
>>> print(mpl.__version__)
3.8.4
>>> import matplotlib.pyplot as plt
>>> plt.cm.get_cmap
<function _get_cmap at 0x11e9f4430>

With matplotlib==3.9.0:

>>> import matplotlib as mpl
>>> print(mpl.__version__)
3.9.0
>>> import matplotlib.pyplot as plt
>>> plt.cm.get_cmap
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: module 'matplotlib.cm' has no attribute 'get_cmap'

@n-poulsen n-poulsen added the Another package code issue Bug/issue that relates to a dlc dependency label May 20, 2024
@n-poulsen n-poulsen requested review from AlexEMG and MMathisLab May 20, 2024 08:51
@n-poulsen n-poulsen changed the title Niels/pin matplotlib pin matplotlib version May 20, 2024
@MMathisLab MMathisLab merged commit 0835967 into main Jun 5, 2024
@MMathisLab MMathisLab deleted the niels/pin_matplotlib branch June 5, 2024 09:25
@NadjaBrun
Copy link

Hi! Thanks for working on this!

I use google colab and just tried to start evaluating. However, the error message remains:
AttributeError: module 'matplotlib.cm' has no attribute 'get_cmap'

Any help is much appreciated!

@MMathisLab
Copy link
Member

yes, matplotlib just changed, so you will need to explicitly call and older version by running in Colab: !pip install matplotlib==(older version) -- or install from source our package !pip install git+https://github.com/DeepLabCut/DeepLabCut.git; DeepLabCut is not updated on pypi only the repo here

@NadjaBrun
Copy link

The evaluation step worked! Thank you so much!

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

Labels

Another package code issue Bug/issue that relates to a dlc dependency

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants