CPJKU / madmom

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

numpy.ndarray size changed, may indicate binary incompatibility. Expected 88 from C header, got 80 from PyObject #485

Open asapsmc opened 3 years ago

asapsmc commented 3 years ago

When I'm importing madmom, I get the following error:

numpy.ndarray size changed, may indicate binary incompatibility. Expected 88 from C header, got 80 from PyObject

Information about installed software

My machine is a MacM1 and I've been fighting with tensorflow installation for a while now. Presently, I could find a combination of versions (mainly tensorflow related) that could work (I attach the output of pip freeze). I understand that this error is related to the "fuzzy" conda environment I'm working at, but I would like to know if there's any way I can solve this from madmom perspective, ie, without changing too much the other packages (mainly tensorflow-related), as it is very difficult to find working alternatives. environment.txt

asantos-6 commented 2 years ago

I have the exact same issue. I tried to downgrade to the minimum supported NumPy version, but it seems version 1.13.4 is no longer distributed as far as I understand it. Have you made any progress @MR-T77?

asapsmc commented 2 years ago

I did solve, although I don't recall exactly how. I suppose the best option is to try to install everything from pip (and not conda).

dreness commented 2 years ago

"me too" please and thank you :)

enricguso commented 2 years ago

I had this issue too, but installing everything from pip did solve it. I had to pip install --upgrade numpy after installing the rest of packages and install numpy 1.22, because with numpy 1.21 madmom crashes. The only problem is that librosa needs numpy 1.21 (because of numba), so for the moment I can't make both packages work in the same environment. I guess I'll have to wait for a numba upgrade.

didadida-r commented 2 years ago

@enricguso yeah, this problem can be solved when update madmom to 1.22

didadida-r commented 2 years ago

this problem can be solve when downgrading the python from 3.8 to 3.7, then the numpy version can be installed in 1.21.