How to install xgboost in python on MacOS?

前端 未结 9 823
别那么骄傲
别那么骄傲 2020-12-23 22:19

I am a newbie and learning python. Can someone help me- how to install xgboost in python. Im using Mac 10.11. I read online and did the below mentioned step, but not able to

9条回答
  •  爱一瞬间的悲伤
    2020-12-23 23:08

    For Python-3.x, do the following in Mac

    Make sure gcc-6 (and g++-6) is installed, if not do so with

    brew install gcc
    

    Then, do the following

    git clone --recursive https://github.com/dmlc/xgboost
    cd xgboost/
    make -j4
    cd python-package
    python3 setup.py install
    

    If you are using Anaconda and haven't yet configured your path to use the binaries in ~/anaconda/bin, then run the last line as

    /path/to/anaconda/bin/python3 setup.py install

提交回复
热议问题