LoginSignup
2
4

More than 5 years have passed since last update.

Macにxgboostをpipでインストール

Posted at

公式のInstallation Guideを読めばヒントは書いてあるのですが、そのままではエラーが出たのでメモになります。

単純にpipでインストールする場合、gcc5のインストール後にpipでxgboostをインストールするように記載されています。

brew install gcc5
pip install xgboost

ただ、そのまま実行しても以下のエラーによりビルドに失敗しました。

    clang: error: unsupported option '-fopenmp'

pip install xgboostを実行する前に、以下のようにC/C++のコンパイラとしてgcc5でインストールを使うように設定することで、エラーなくインストールできました。

export CC=gcc-5
export CXX=g++-5
2
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
4