Skip to content

Cant import madmom #547

@jash230

Description

@jash230

Cant run the command: pip install madmom

when i run this command:

this error shows up in the terminal:

rror: subprocess-exited-with-error

× Preparing metadata (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [81 lines of output]

  Error compiling Cython file:
  ------------------------------------------------------------
  ...
  import numpy as np
  
  cimport numpy as np
  cimport cython
  
  from numpy.math cimport INFINITY
  ^
  ------------------------------------------------------------
  
  madmom/features/beats_crf.pyx:25:0: 'numpy/math.pxd' not found
  
  Error compiling Cython file:
  ------------------------------------------------------------
  ...
  import numpy as np
  
  cimport numpy as np
  cimport cython
  
  from numpy.math cimport INFINITY
  ^
  ------------------------------------------------------------
  
  madmom/features/beats_crf.pyx:25:0: 'numpy/math/INFINITY.pxd' not found
  
  Error compiling Cython file:
  ------------------------------------------------------------
  ...
          v_p[i] = pi[i] + activations[i] + norm_factor[i]
  
      # iterate over all beats; the 1st beat is given by prior
      for k in range(num_x - 1):
          # reset all current viterbi variables
          v_c[:] = -INFINITY
                    ^
  ------------------------------------------------------------
  
  madmom/features/beats_crf.pyx:200:18: 'INFINITY' is not a constant, variable or function identifier
  
  Error compiling Cython file:
  ------------------------------------------------------------
  ...
              v_c[i] += activations[i] + norm_factor[i]
  
          v_p, v_c = v_c, v_p
  
      # add the final best state to the path
      path_prob = -INFINITY
                   ^
  ------------------------------------------------------------
  
  madmom/features/beats_crf.pyx:226:17: 'INFINITY' is not a constant, variable or function identifier
  Compiling madmom/audio/comb_filters.pyx because it changed.
  Compiling madmom/features/beats_crf.pyx because it changed.
  Compiling madmom/ml/hmm.pyx because it changed.
  Compiling madmom/ml/nn/layers.py because it changed.
  [1/4] Cythonizing madmom/audio/comb_filters.pyx
  [2/4] Cythonizing madmom/features/beats_crf.pyx
  Traceback (most recent call last):
    File "/Users/thezazakid/Dechord3/.venv/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 389, in <module>
      main()
    File "/Users/thezazakid/Dechord3/.venv/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 373, in main
      json_out["return_val"] = hook(**hook_input["kwargs"])
    File "/Users/thezazakid/Dechord3/.venv/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 175, in prepare_metadata_for_build_wheel
      return hook(metadata_directory, config_settings)
    File "/Users/thezazakid/Dechord3/.venv/lib/python3.10/site-packages/setuptools/build_meta.py", line 377, in prepare_metadata_for_build_wheel
      self.run_setup()
    File "/Users/thezazakid/Dechord3/.venv/lib/python3.10/site-packages/setuptools/build_meta.py", line 522, in run_setup
      super().run_setup(setup_script=setup_script)
    File "/Users/thezazakid/Dechord3/.venv/lib/python3.10/site-packages/setuptools/build_meta.py", line 320, in run_setup
      exec(code, locals())
    File "<string>", line 89, in <module>
    File "/Users/thezazakid/Dechord3/.venv/lib/python3.10/site-packages/Cython/Build/Dependencies.py", line 1145, in cythonize
      cythonize_one(*args)
    File "/Users/thezazakid/Dechord3/.venv/lib/python3.10/site-packages/Cython/Build/Dependencies.py", line 1289, in cythonize_one
      raise CompileError(None, pyx_file)
  Cython.Compiler.Errors.CompileError: madmom/features/beats_crf.pyx
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

how the hell do i fix this i feel like im losing my mind

app info:

mac os
Python 3.13.3
numpy 2.2.5

steps needed to reproduce

make pip install madmom f'ing work

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