-
Notifications
You must be signed in to change notification settings - Fork 118
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
Stim v1.7.0 installation fails for Apple Silicon #179
Comments
Thanks for reporting this so quickly. I'll fix the missing header today and drop the mac prebuilts and look into if ciwheelbuilder can do M1 stuff... |
Thanks! It looks like there was a similar issue last year with Tensorflow: https://stackoverflow.com/questions/65383338/zsh-illegal-hardware-instruction-python-when-installing-tensorflow-on-macbook. |
I'll leave the crash report here too in case it helps
|
That's such a weird place for it to fail. It's initializing the gate data map? There's nothing particularly simd-ish happening there... I wonder if it's just a compiler optimization that used avx without me realizing, and it comes down to the fact that the architecture detection is using the avx version initially instead of the non-avx version... Could you find the
at the top with
and see if that works? In the meantime I'm gonna try to get my hands on an M1 macbook... |
Sure, just made that change in the |
Okay, that's an easy fix then. I'll look into the header issue (since I want the fallback to work too!) and then make a release. Thanks this was really helpful. |
Great, thanks! |
- For sdist, fix specifying `data_files=` on each Extension instead of on the package itself - For sdist, fix headers being given as `data_files=` instead of `headers=` - For wheels, fix using the avx2 instead of the vanilla package to determine CPU capabilities - It was touching avx instructions along the way, causing crashes on M1 macs First part of fixing #179
Okay, I have uploaded v1.7.1. Could you confirm that Also, could you confirm that |
Sure, both the prebuilt and source installations work nicely now with v1.7.1 |
Great, closing the issue as fixed. |
Unfortunately the Python interpreter crashes (using an M1-based mac) when importing
stim
after installing v1.7.0 with the prebuilt binaries:I tried instead installing from source with the pip
--no-binary
flag which raises this exception instead:since the
stim.h
file is no longer in the source distribution. From a comparison with the v1.6.0 source distribution it looks like all the header files are missing in the v1.7.0 PyPI source distribution.The text was updated successfully, but these errors were encountered: