I have followed following method link to install in mac.
When I run following command, I get output gcc 7.2.0 already installed
brew install gcc
After that I config.mk file in make folder to following, because I have 7.2.0 gcc installed.
export CC = gcc-7
export CXX = g++-7
I run following command make clean_all && make -j4
once I change config.mk file is changed.
Then I run cd python-package; python setup.py install
.
If without closing terminal i go to python3.6, where I can access xgboost without problem. However, when I switch to different terminal, I am getting following error
OSError: dlopen(/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/xgboost/./lib/libxgboost.so, 6): Library not loaded: /usr/local/opt/gcc/lib/gcc/5/libgomp.1.dylib
Referenced from: /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/xgboost/./lib/libxgboost.so
Reason: image not found
Any ideas why it is happening, how to fix it ?