最近在mac上用到xgboost库,安装时遇到颇多大坑,网上查了很多答案几乎都是win上的问题,没遇到理想的,自己也就摸着石头把几个大坑给填了,总结一下,给后人少走点弯路。
倘若直接 pip install xgboost
时,会出现Command "python setup.py egg_info" failed with error code 1
的错误提示,
还是乖乖使用Github源代码安装吧~
可看出gitclone下来的时候回自动clone上其引用库,而直接使用Release包则不会
brew install gcc --without-multilib