Skip to content

NumPy 2.0+ Compatibility Problem #8

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
yanirmr opened this issue Apr 10, 2025 · 0 comments
Open

NumPy 2.0+ Compatibility Problem #8

yanirmr opened this issue Apr 10, 2025 · 0 comments

Comments

@yanirmr
Copy link

yanirmr commented Apr 10, 2025

Description

When using HebTTS in Colab, I encountered compatibility issues with NumPy 2.0+. The module that was compiled using NumPy 1.x crashes when run with NumPy 2.0.2 (which is the default in Colab now).

Steps to Reproduce

  1. Clone the HebTTS repository
  2. Install dependencies (note that there is no requirements.txt file)
  3. Try to run the inference script
  4. Observe error related to NumPy version compatibility

Error Message

A module that was compiled using NumPy 1.x cannot be run in NumPy 2.0.2 as it may crash. To support both 1.x and 2.x versions of NumPy, modules must be compiled with NumPy 2.0. Some module may need to rebuild instead e.g. with 'pybind11>=2.12'.

Solution

Downgrading NumPy to version 1.x resolves the issue:
pip install 'numpy<2'

Suggested Improvements

  1. Add a proper requirements.txt file to the repository to ensure consistent dependency versions
  2. Either lock the NumPy version to <2.0 or update the codebase to support NumPy 2.0+
  3. Consider adding a note in the README about this compatibility issue

This issue affects users running the code in environments with newer NumPy versions (like Google Colab's default setup), and the current workaround requires manual downgrading of NumPy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant