CPJKU / madmom

Python audio and music signal processing library
https://madmom.readthedocs.io
Other
1.35k stars 206 forks source link

Cannot Import name 'MutableSequence' from 'collections' #509

Open asapsmc opened 2 years ago

asapsmc commented 2 years ago

I'm getting this error when I try to import from madmom:

Exception has occurred: ImportError
cannot import name 'MutableSequence' from 'collections' (/Users/machine/miniforge3/envs/22env/lib/python3.10/collections/__init__.py)
    from madmom.audio.spectrogram import FilteredSpectrogramProcessor, LogarithmicSpectrogramProcessor, SpectrogramDifferenceProcessor

I'm running in a conda environment with the following versions: python 3.9.7 madmom 0.16.1 numpy 1.21.4

inikishev commented 2 years ago

I'm getting this error when I try to import from madmom:

Exception has occurred: ImportError
cannot import name 'MutableSequence' from 'collections' (/Users/machine/miniforge3/envs/22env/lib/python3.10/collections/__init__.py)
    from madmom.audio.spectrogram import FilteredSpectrogramProcessor, LogarithmicSpectrogramProcessor, SpectrogramDifferenceProcessor

I'm running in a conda environment with the following versions: python 3.9.7 madmom 0.16.1 numpy 1.21.4

u need to add from collections.abc import MutableMapping, MutableSequence

orrp commented 1 year ago

This will be an issue for any Python version 3.10 or higher: https://stackoverflow.com/questions/70870041/cannot-import-name-mutablemapping-from-collections