kodonnell / qoi

A simple Python wrapper around QOI (https://github.com/phoboslab/qoi)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Incompatibility with `numpy` 2.0.0 -> error on import

MikiP98 opened this issue · comments

Importing QOI package while having Numpy 2.0.0 installed causes this error:

Traceback (most recent call last):
  File "D:\...\MultiScaler-Plus\src\standalone.py", line 14, in <module>
    import qoi
  File "C:\Users\...\AppData\Roaming\Python\Python312\site-packages\qoi\__init__.py", line 2, in <module>
    from qoi.qoi import QOIColorSpace, decode, encode, read, write
  File "src/qoi/qoi.pyx", line 1, in init qoi.qoi
ValueError: numpy.dtype size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject

Thanks, verified. Looks like numpy 2 is release as of a week ago, and these release notes look pretty relevant!

image

I'll have a quick look at how scipy does things (which is where most of my setup.py is copied from).

Cool, v0.7.0 should now support numpy>=2.0.0 (and older versions). Once the github action has run (assuming it succeeds), it should publish - can you check? Thanks.

Neat!
Thanks a lot!
Have a nice day :)
I will check if it is working in a moment

Older Numpy still works with no issues, newer does not crash on QOI import but crashes on different package import...
Time to make a new issue on different repo :/

Thanks for quick response!
Have a nice day! 😺

Found the new culprit: Torch
Issue already there, just have to wait.