Skip to content
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

Running demo example, Numpy 2.X problem #141

Open
JoseAngelGarciaSanchez opened this issue Oct 9, 2024 · 0 comments
Open

Running demo example, Numpy 2.X problem #141

JoseAngelGarciaSanchez opened this issue Oct 9, 2024 · 0 comments

Comments

@JoseAngelGarciaSanchez
Copy link

Issue Summary:
When installing the project dependencies on macOS using an M chip, an incompatibility issue arises during the execution of the demo example. Specifically, modules that were compiled using NumPy 1.x cannot be run with the latest version of NumPy (2.1.2), as it causes a crash.

Steps to Reproduce:

  1. Set up a development environment on macOS with an M chip.
  2. Follow the installation instructions to install project dependencies.
  3. Run the demo example that rely on NumPy.

Observed Behavior:

  • A crash occurs with the following error message:
A module that was compiled using NumPy 1.x cannot be run in NumPy 2.1.2 as it may crash.

Workaround: I was able to solve the issue by manually downgrading NumPy to version 1.26.4:

pip install numpy==1.26.4

Root Cause:
The issue stems from the project's requirements+cpu.txt, which does not explicitly specify a compatible version of NumPy. The absence of strict versioning allows pip to install NumPy 2.1.2, which is incompatible with modules compiled for NumPy 1.x.

Proposed Solution:
Update the requirements+cpu.txt to include an explicit version constraint for NumPy or modules must be compiled with NumPy 2.0. Some module may need to rebuild instead.

numpy>=1.26.4,<2.0
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