Bus Error 10 on Apple Silicon compiled for python 3.8
See original GitHub issueDescribe 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:
export LDFLAGS="$LDFLAGS -Wl,-rpath,/opt/homebrew/lib/ -L/usr/local/opt/libomp/lib -lomp"
export CPPFLAGS="$CPPFLAGS -Xpreprocessor -fopenmp"
Build succeeds but testing gives the error:
Successfully installed scikit-learn
Removed build tracker: '/private/var/folders/lp/ytqhb2lj0sxf89sdd16z61pc0000gn/T/pip-req-tracker-ja_3b66l'
(tfmac) bash-3.2$ python3 -c "import sklearn; sklearn.show_versions()"
Bus error: 10
(tfmac) bash-3.2$
Expected Results
python3 -c “import sklearn; sklearn.show_versions()” works correctly
Actual Results
Successfully installed scikit-learn
Removed build tracker: '/private/var/folders/lp/ytqhb2lj0sxf89sdd16z61pc0000gn/T/pip-req-tracker-ja_3b66l'
(tfmac) bash-3.2$ python3 -c "import sklearn; sklearn.show_versions()"
Bus error: 10
(tfmac) bash-3.2$
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
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (6 by maintainers)
Top Results From Across the Web
What's Bus error 10 and how to solve it - Apple Community
When I'm trying to run an script in my Mac which I get bus error 10, I opened console and search for turn...
Read more >TensorFlow on Apple M1 with 27130 bus error python
I'm having error on the TensorFlow example given here: https://www.tensorflow.org/tutorials/quickstart/beginner with setup given here: ...
Read more >Please support tensorflow-text-macos - Apple Developer
I tried to revert my tensorflow-macos to 2.9, but when I work with it, it throws an error "zsh: bus error". It's not...
Read more >Apple Silicon | Apple Developer Forums
Question: Is AirPlay supported for iOS apps running on apple silicon? ... Code 10 Bus error: 10 Terminating Process: exc handler [99567] VM...
Read more >Swift "Bus error: 10" | Apple Developer Forums
Google search reports Bus error: 10 is due to memory addressing error. However, there is nothing within Swift that lets me manipulate addresses...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
(tfmac) bash-3.2$ python3 -c “import platform; print(platform.platform())” macOS-11.1-arm64-arm-64bit
I opened https://github.com/scikit-learn/scikit-learn/issues/19137 to track progress for this. Let’s close this issue to keep things simple.