[已解决]报错:XGBoostError: XGBoost Library (libxgboost.dylib) could not be loaded.

在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

原文地址:https://www.cnblogs.com/hankleo/p/13739899.html