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

isal incompatible with apple silicon #116

Closed
poneill opened this issue Jun 7, 2023 · 4 comments · Fixed by #119
Closed

isal incompatible with apple silicon #116

poneill opened this issue Jun 7, 2023 · 4 comments · Fixed by #119

Comments

@poneill
Copy link
Contributor

poneill commented Jun 7, 2023

installing the python isal on an M2 mac yields the following error:

ERROR: Failed building wheel for isal

which afaict is expected because ISA-L doesn't support mac ARM (see e.g. pycompression/python-isal#114 (comment)).

isal is currently used to provide igzip. Possible resolutions include:

  1. Reverting to vanilla gzip throughout.
  2. Attempting to install igzip if available and falling back to gzip upon failure.
  3. Re-architecting search to avoid the need for igzip.
  4. Something else?
@akotlar
Copy link
Collaborator

akotlar commented Jun 7, 2023

Trying to reproduce, and so I can't on my Apple M2 Pro:

(base) alexkotlar@alexkotlars-MacBook-Pro ~ % python --version
Python 3.11.3
(base) alexkotlar@alexkotlars-MacBook-Pro ~ % pip install isal
Requirement already satisfied: isal in ./miniconda3/lib/python3.11/site-packages (1.1.0)
(base) alexkotlar@alexkotlars-MacBook-Pro ~ % 
(base) alexkotlar@alexkotlars-MacBook-Pro ~ % ipython
Python 3.11.3 (main, Apr 19 2023, 18:51:09) [Clang 14.0.6 ]
Type 'copyright', 'credits' or 'license' for more information
IPython 8.12.0 -- An enhanced Interactive Python. Type '?' for help.

In [1]: from isal import igzip

In [2]: with igzip.open("t.gz", "wb") as f:
   ...:     f.write(bytes("Hello world"))
   ...: 
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
Cell In[2], line 2
      1 with igzip.open("t.gz", "wb") as f:
----> 2     f.write(bytes("Hello world"))

TypeError: string argument without an encoding

In [3]: with igzip.open("t.gz", "wb") as f:
   ...:     f.write(bytes("Hello world".encode("utf-8")))
   ...: 

In [4]: with igzip.open("t.gz", "rb") as f:
   ...:     print(f.readlines())
   ...: 
[b'Hello world']

This may be because I'm using conda instead of virtualenv.

Looking at ISA-L, the actual library appears to support Apple Silicon as of intel/isa-l#164, with intel/isa-l#226 being a concern. I've made a comment asking about whether Intel feels this library is safe to use on Mac OS.

Will dig deeper into your issues. It would be helpful if you could try again to install and share the full error message, environment details.

@akotlar
Copy link
Collaborator

akotlar commented Jun 7, 2023

In intel/isa-l#234 (comment) it appears the mystery is resolved.

The author pushed the necessary fixes to conda-forge. Installing from conda should resolve the issues you were experiencing.

I'm not opposed to moving to a different gzip library, this isn't inspiring any confidence. If there's nothing compelling out there we can just use pigz.

@akotlar
Copy link
Collaborator

akotlar commented Jun 7, 2023

With intel/isa-l#245, I think I'm convinced to drop this library

akotlar added a commit that referenced this issue Jun 8, 2023
@akotlar akotlar linked a pull request Jun 8, 2023 that will close this issue
@cielavenir
Copy link

Can I see what is the conda-forge fix

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

Successfully merging a pull request may close this issue.

3 participants