This is the error I get after installing xgboost on mac :
XGBoostError: XGBoost Library (libxgboost.dylib) could not be loaded. Likely causes:
OpenMP runtime is not installed
- vcomp140.dll or libgomp-1.dll for Windows
- libomp.dylib for Mac OSX
- libgomp.so for Linux and other UNIX-like OSes
Mac OSX users: Run
brew install libompto install OpenMP runtime.
You are running 32-bit Python on a 64-bit OS
Error message(s): ['dlopen(/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/xgboost/lib/libxgboost.dylib, 6): Library not loaded: /usr/local/opt/libomp/lib/libomp.dylib\n Referenced from: /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/xgboost/lib/libxgboost.dylib\n Reason: no suitable image found. Did find:\n\t/usr/local/opt/libomp/lib/libomp.dylib: mach-o, but wrong architecture\n\t/opt/homebrew/Cellar/libomp/13.0.0/lib/libomp.dylib: mach-o, but wrong architecture']
To clarify, Python is 64 bit on my system. I have followed steps as mentioned in below articles :
- Getting this simple problem while importing Xgboost on Jupyter notebook
- Error "mach-o, but wrong architecture" after installing anaconda on mac
Can anyone help please ?
Thanks Manika