Psy-Fer / buttery-eel

The buttery eel - a slow5 guppy/dorado basecaller wrapper
MIT License
34 stars 2 forks source link

New numpy causes installation to fail: numpy.dtype size changed, may indicate binary incompatibility. #38

Closed tjprins closed 3 months ago

tjprins commented 3 months ago

Hello,

I recently tried installing buttery-eel by following the Quickstart instructions, but kept getting the following error when calling buttery-eel --help after the installation was complete:

Traceback (most recent call last):
  File "/home/tj/buttery-eel/dorado/bin/buttery-eel", line 5, in <module>
    from src.buttery_eel import main
  File "/home/tj/buttery-eel/dorado/lib/python3.9/site-packages/src/buttery_eel.py", line 14, in <module>
    import pyslow5
  File "python/pyslow5.pyx", line 1, in init pyslow5
ValueError: numpy.dtype size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject

It looks like numpy was upgraded a few days ago (6/17/24) to 2.0.0, which seems to have broken a few things. I was able to fix the issue by making sure the old numpy was installed, using the following command:

pip install numpy==1.26.4

If you run into this issue, try downgrading your numpy.

Psy-Fer commented 3 months ago

Hey,

Thanks for posting this error. This specifically is from pyslow5 not having version restrictions on numpy. This causes some.issues when installing from a wheel file that compiles the code with a numpy of 1.*

We are in the process of building new wheels to submit to pypi to solve this.

The solution in the meantime is to either downgrade numpy or manually install pyslow5 with numpy 2.0.0

New wheels should be up soon.

Cheers, James

tjprins commented 3 months ago

Thanks, James. I'll close the issue since it is resolved, but hopefully this will help anyone else that runs into the issue.