![]() ![]() ![]() Patchelf -add-needed /home/ahemf/anaconda3/bin/./lib/libpython3.6m.so.1.0 python3.6 Patchelf -set-interpreter /home/linuxbrew/.linuxbrew/lib/ld-linux-x86-64.so.2 -set-rpath /home/linuxbrew/.linuxbrew/lib/ python3.6 Check your python executable for where it links glibc using ldd full-path/your-python-execĬp ~/anaconda3/bin/python3.6 ~/anaconda3/bin/python3.6_backup.Versions of gcc older than 5 will not work with XGB and TF A directory called python-package will be created, we need to pip install it by.Edit the Makefile you see line for configuring compiler for darwin (OSX) change them to below, Note the use of same gcc versions from the config.mk stepĮxport CC = $(if $(shell which clang), clang, gcc-8)Įxport CXX = $(if $(shell which clang++), clang++, g++-8).there will be a line for ADD_CFLAGS, edit it to:ĪDD_CFLAGS = -O3 -msse2 -funroll-loops -march=native -fopenmp.Now edit the config.mk file, add below lines to it, make sure you specify the gcc version you installed.cd to xgboost directory and copy the config file from make folder to the outer xgboost folder.Clone the xgboost git repo XGB-Git git clone -recursive Installing on macOS You can install Anaconda using either the graphical installer (wizard) or the command line (manual) instructions below.Install compiler packages, default clang compiler provided by xcode does not have openmp support, which means that your xgboost will not be multithreaded if you compile using default xcode gcc/clang.See why conda install -y -c conda-forge xgboost doesn't work here.if Above doesn't work for Linux try these steps.This doesn't work on Mac 10.12.6 Sierra (Tried) More.Now restart Python/Anaconda and you should be able to import the library. cd python-package python setup.py install This should configure it cleanly and build the library. Save the file and now you need to run a cleaning step since you changed the Makefile. To the following: export CC = $(if $(shell which clang), clang, gcc-6)Įxport CXX = $(if $(shell which clang++), clang++, g++-6) Save the file.Īlso, make changes to the file xgboost/Makefile change lines: export CC = $(if $(shell which clang), clang, gcc)Įxport CXX = $(if $(shell which clang++), clang++, g++) It did not for me I needed to add the -6 to both lines. If you have your computer formatted correctly, simply typing open make/config.mk may work. It is possible that simply uncommenting the lines solves the problem. Clone the repository wherever you want your directory to be using this line git clone recursive cd into your new directory called xgboost cd xgboost Open the make/config.mk. ![]() Uncomment the lines near the top of the file:Ĭhange them to the following: export CC = gcc-6 Now, use your favorite editor (I used vi), and go into the file that you copied from /make to /xgboost vi config.mk The problem is that some key lines in the make files are commented out and also not fully specified. Conda install xgboost for mac os series#The next series of steps differ from the documentation on the xgboost site, and I cobbled it together from lots of sources and also experimenting. I downloaded it to Anaconda/pkgs directory. You might get some warnings to unlink directories or delete them if you have other versions installed follow the warnings/instructions. It took me a while to work through the various issues, but it is now running nicely in my Anaconda (P圓6) environment.įor multi-threading you need to do the following first (install homebrew if you have not done so): brew install gcc -without-multilib ![]() For the record, I am using a Mac with OS X 10.10 (Yosemite). It's a little more complicated if you want to use multi-threading. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |