Jason Tian

Suck out the marrow of data

XGBoost Installation under Anaconda

I try to install the newest XGBoost version xgboost 0.6a2 under the Environment:

Python 3.5.1 :: Anaconda custom (x86_64)

As recommended in the document, I firstly try:

  1. brew tap homebrew/versions
  2. install gcc --without-multilib1
  3. pip install xgboost

However, I got one error which I cannot fix:

Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/4v/r8x7ssn916792z84sf7chx740000gn/T/pip-build-m6rki5l0/xgboost/

Then I try the other option in the xgboost documents, which is to clone the XGBoost github repo and then install:

git clone --recursive https://github.com/dmlc/xgboost
cd xgboost
cp make/config.mk ./config.mk
make -j4

Install system-widely, which requires root permission

cd python-package
sudo python setup.py install

You will however need Python distutils module for this to work. It is often part of the core python package or it can be installed using your package manager, e.g. in Debian use

sudo apt-get install python-setuptools

If you recompiled xgboost, then you need to reinstall it again to make the new library take effect

Note: you may need to brew tap homebrew/versions and install gcc --without-multilib1 if you did not install gcc-5 or gcc-6 before.