-
Notifications
You must be signed in to change notification settings - Fork 97
Blosc fails to import using PyPy #238
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
Comments
I don't know that any explicit work has been done on PyPy support. So this might not work. That said, components like Blosc depend on a working compiler to be available. On macOS this means installing Xcode and Xcode Command Line Tools. It's unfortunate that |
Okay, thanks. After some digging it seems like this could be related to issues with the build in PyPy and/or c-blosc needs a separate CFFI-based wrapper (likely) to work with PyPy. I think it might be helpful to add a note about PyPy compatibility to the docs for anyone else scratching their heads about this. |
Going to reopen as I think this is still worth tracking. |
Just to add we are disabling the C extensions for PyPy on these lines. This goes back to the first commit of Numcodecs ( 4e9ee6b ) and appears to have been originally disabled in Zarr with PR ( zarr-developers/zarr-python#22 ). Lines 348 to 349 in b7c5a81
@alimanfoo, do you recall what issues you ran into when trying to build Numcodecs on PyPy? |
FWIW I tried just dropping those lines and building with PyPy locally on macOS and it seemed to work. Submitted PR ( #246 ) to make that change and add an item to the CI matrix. |
Since we don't support PyPy at the moment, I'm going to close this. I think we would welcome a more general request issue for PyPy support if there is demand however, and someone is willing to create and maintain some PyPy continuous integration. |
Would add the small exception that we do support pure Python compressors for PyPy We just disable all compiled extensions with PyPy (as noted below). This includes Blosc (hence the error above is expected currently) Lines 383 to 385 in 230bc01
There have been a few attempts to build compiled extensions for PyPy, but ultimately those have been abandoned. A fresh attempt would be welcome |
Note that |
Minimal, reproducible code sample, a copy-pastable example if possible
Problem description
The latest
numcodecs
package (0.6.4) installs successfully via pip in a pypy-based venv. I see no errors or warnings when installing zarr (or when installing numcodecs independently) using-vvv
. However, importingBlosc
throws the exception:ImportError: cannot import name 'Blosc'
(similar errors are thrown from Zarr when opening a Blosc-compressed file).I assume this is related to an incompatibility with PyPy, but I couldn't find any documentation about using PyPy with Zarr.
Version and installation information
Please provide the following:
numcodecs.__version__
: 0.6.4The text was updated successfully, but these errors were encountered: