解决XGboost安装问题:xgboost.core.XGBoostError: XGBoost Library (xgboost.dll) could not be loaded.

解决XGboost安装问题:xgboost.core.XGBoostError: XGBoost Library (xgboost.dll) could not be loaded.

今天在拟合xgboost模型的时候,输入如下代码段:

import xgboost
from xgboost import XGBClassifier
model = XGBClassifier()
model.fit(X_train, y_train)

出现了报错:
解决XGboost安装问题:xgboost.core.XGBoostError: XGBoost Library (xgboost.dll) could not be loaded._第1张图片
于是,根据错误提示“likely cause”的指示,在终端输入“brew install libomp”,等待安装完成,再重新运行代码,问题就得到解决啦!

原文网址:https://blog.csdn.net/dhdhdh0920/article/details/106941140

你可能感兴趣的:(python,python)