在jupyter notebook上安裝xgboost
pip install xgboost
安裝完成后運行 import xgboost
發生報錯
報錯內容如下:
XGBoostError: XGBoost Library (libxgboost.dylib) could not be loaded.
解決方法如下:
首先在終端刪除xgboost
conda remove xgboost
然后重新安裝
conda install py-xgboost
最后檢查安裝
import xgboost