Skip to content

Dependency conflict: (2.5.0rc0): nemo-toolkit[asr] incompatible with numpy>=2.0 #14505

@baptiste-mnh

Description

@baptiste-mnh

Describe the bug

There is a dependency conflict when trying to install nemo-toolkit[asr] alongside numpy>=2.0. However, it works with nemo-toolkit.

Steps/Code to reproduce bug

Installation Issue

  1. Create a requirements.txt with:

    numpy>=2.0.2
    nemo-toolkit[asr]==2.5.0rc0
    
  2. Run: pip install -r requirements.txt

  3. Error occurs:

    ERROR: Cannot install nemo-toolkit==2.5.0rc0 and nemo-toolkit[asr]==2.5.0rc0 because these package versions have conflicting dependencies.
    
    The conflict is caused by:
        The user requested nemo-toolkit==2.5.0rc0
        nemo-toolkit[asr] 2.5.0rc0 depends on nemo-toolkit 2.5.0rc0 (Installed)
    
  4. Additional error when trying to install with numpy>=2.0:

    ERROR: Cannot install nemo-toolkit, nemo-toolkit[asr]==2.5.0rc0 and numpy>=2.0.2 because these package versions have conflicting dependencies.
    
    The conflict is caused by:
        The user requested numpy>=2.0.2
        nemo-toolkit 2.5.0rc0 depends on numpy>=1.22
        nemo-toolkit[asr] 2.5.0rc0 depends on numpy>=1.22
        nemo-toolkit[asr] 2.5.0rc0 depends on numpy<2.0.0; extra == "asr"
    

Same issue using directly the latest main commit : git+https://github.com/NVIDIA/NeMo.git@main#egg=nemo_toolkit[asr]

Environment overview

  • Environment location: Bare-metal (macOS)
  • Method of NeMo install: pip install from PyPI
  • Install command: pip install "nemo-toolkit[asr]==2.5.0rc0" "numpy>=2.0.2"

Environment details

  • PyTorch version: 2.8.0
  • Python version: 3.12.9
  • Platform: ARM64 (Apple Silicon)

Additional context

This issue prevents using NeMo ASR functionality with modern numpy versions (>=2.0). The problem has two aspects:

  1. Installation conflict: The nemo-toolkit[asr] 2.5.0rc0 package having an explicit constraint numpy<2.0.0; extra == "asr" prevents installation alongside numpy>=2.0
  2. Missing ASR dependencies: Installing only the base nemo-toolkit==2.5.0rc0 package (which works with numpy>=2.0) doesn't include critical ASR dependencies like hydra-core, causing runtime failures when importing nemo.collections.asr

The workaround using the main branch suggests that PR #11447 (which addresses numpy 2.x compatibility) fix the issue with nemo-toolki but for ASR use.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions