Replies: 1 comment
-
I answer my own question here - what does work is pulling madmom from github and install it locally with the setup.py. Like this you get version 0.17 which does not have the numpy issue as mentioned before. seems to work okay on windows. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I tried setting up madmom on a windows machine - I have used the package before under mac os x with no problems.
There seems to be an issue with the numpy version, please see error message below, it already pops up when importing madmom. It seems also downgrading numpy to a version below 1.20 also does not work as it causes trouble with cython.
Honestly , this is also not really what I need, as the environment should ideally also contain packages which require higher a recent version of numpy. I have already seen from other windows related posts that the main developer does not use windows - and probably for good reasons. I am considering getting my feet wet with linux - as this also seems the way to go for the machine learning tasks.
Can anyone confirm that madmom works fine on linux ? Any known pitfalls ?
Many thanks!
AttributeError Traceback (most recent call last)
Cell In[1], line 1
----> 1 import madmom
File ~\AppData\Roaming\Python\Python39\site-packages\madmom_init_.py:24
21 import pkg_resources
23 # import all packages
---> 24 from . import audio, evaluation, features, io, ml, models, processors, utils
26 # define a version variable
27 version = pkg_resources.get_distribution("madmom").version
File ~\AppData\Roaming\Python\Python39\site-packages\madmom\evaluation_init_.py:874
870 return g, f
873 # finally import the submodules
--> 874 from . import chords, beats, notes, onsets, tempo
876 # import often used classes
877 from .beats import BeatEvaluation, BeatMeanEvaluation
File ~\AppData\Roaming\Python\Python39\site-packages\madmom\evaluation\chords.py:35
32 import numpy as np
34 from . import evaluation_io, EvaluationMixin
---> 35 from ..io import load_chords
38 CHORD_DTYPE = [('root', np.int),
39 ('bass', np.int),
40 ('intervals', np.int, (12,))]
42 CHORD_ANN_DTYPE = [('start', np.float),
43 ('end', np.float),
44 ('chord', CHORD_DTYPE)]
File ~\AppData\Roaming\Python\Python39\site-packages\madmom\io_init_.py:22
18 ENCODING = 'utf8'
20 # dtype for numpy structured arrays that contain labelled segments
21 # 'label' needs to be castable to str
---> 22 SEGMENT_DTYPE = [('start', np.float), ('end', np.float), ('label', object)]
25 # overwrite the built-in open() to transparently apply some magic file handling
26 @contextlib.contextmanager
27 def open_file(filename, mode='r'):
File c:\ProgramData\anaconda3\envs\madm\lib\site-packages\numpy_init_.py:353, in getattr(attr)
348 warnings.warn(
349 f"In the future
np.{attr}
will be defined as the "350 "corresponding NumPy scalar.", FutureWarning, stacklevel=2)
352 if attr in former_attrs:
--> 353 raise AttributeError(former_attrs[attr])
355 if attr == 'testing':
356 import numpy.testing as testing
AttributeError: module 'numpy' has no attribute 'float'.
np.float
was a deprecated alias for the builtinfloat
. To avoid this error in existing code, usefloat
by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, usenp.float64
here.The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
Beta Was this translation helpful? Give feedback.
All reactions