Skip to content

AttributeError: np.NaN was removed in the NumPy 2.0 release. Use np.nan instead. #41

@rhdunn

Description

@rhdunn

I'm getting this error when running dataspeech's main.py with python 3.12.11 and the packages installed into a virtual environment.

It is originating in pyannote/audio/core/inference.py line 529. According to pyannote/pyannote-audio#1758 version 3.3.2 has a fix.

If I pass pyannote.audio==3.3.2 to the pip command installing requirements.txt I get an error that "brouhaha 0.9.0 depends on pyannote.audio==3.2.0". The brouhaha library is being installed from source and has a fixed version dependency.

The workaround is to force the version of numpy via:

pip install -r requirements.txt numpy~=1.0

Adding the following line to requirements.txt resolves the issue by doing the same thing -- i.e. limiting numpy to 1.x:

numpy~=1.0

When I run the pip command that installs numpy 1.26.4 instead of the incompatible 2.2.6.

Package Versions:

  • numpy == 2.2.6
  • pyannote.audio == 3.2.0
  • brouhaha == 0.9.0 commit 697f6a35998c1edcf557169ba16fa930def04e7a

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions