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

时间:2022-07-26
本文章向大家介绍[已解决]报错: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