-
-
Notifications
You must be signed in to change notification settings - Fork 25.9k
Bus Error 10 on Apple Silicon compiled for python 3.8 #19097
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
Here's part of the crash dump if this helps:
|
@iRonJ how did you install python3 with homebrew? With or without Can you please report the output of the following command on your machine?
|
From the dump I see
For reference, I installed my own dev env using the macos/aarch64 from miniforge https://github.com/conda-forge/miniforge to install a native ARM64 python + numpy + scipy + cython + "compilers" conda-forge package. Once I activate this env, I can build scikit-learn in native mode without any problem. |
(tfmac) bash-3.2$ python3 -c "import platform; print(platform.platform())" |
libomp was installed via brew I think my NumPy install is broken, it was compiled from source, then I compiled scipy from source, but I think the NumPy compile actually had some failed components but they weren't detected as a failure, and the build process either linked corrupted files, or silently skipped some needed files. I'll try Conda, I didn't think their repos were updated for AS yet though |
Note, that I used the conda-forge community distribution via the miniforge installer, not the default conda channel maintained by Anaconda Inc. |
Also note that homebrew in arm64 native mode is still considered experimental by the homebrew developers. They recommend installing homebrew in x86_64 mode via Rosetta2 emulation for the time being (using the So maybe the arm64 native package package of openblas and libgfortran from homebrew are not fully stable either. Related issues:
So as long as the above upstream issues are not solved, I would recommend scikit-learn users on M1 hardware to use the miniforge distribution. |
I opened #19137 to track progress for this. Let's close this issue to keep things simple. |
Describe the bug
When building from source for python3.8 on an Apple Silicon Mac, the build succeeds, but you can't import sklearn in python
Steps/Code to Reproduce
Follow directions here:
https://scikit-learn.org/stable/developers/advanced_installation.html
Install libomp via brew:
brew install libomp
Set libomp flags per openmp_helpers.py:
Build succeeds but testing gives the error:
Expected Results
python3 -c "import sklearn; sklearn.show_versions()" works correctly
Actual Results
Versions
scipy.version.version
'1.7.0.dev0+9b9f2e8'
numpy.version.version
'1.18.5'
Full log of install process here:
https://pastebin.com/4yXK6KHS
The text was updated successfully, but these errors were encountered: