在python Ubuntu中导入xgboost时,“找不到版本‘GOMP_4.0’”

2024-04-20 05:03:12 发布

您现在位置:Python中文网/ 问答频道 /正文

HiI已经使用以下链接为ubuntu16.04.1lts平台安装了xgboost

http://xgboost.readthedocs.io/en/latest/python/python_intro.html

当我在python终端中运行以下命令时,它将抛出异常,如下面的屏幕截图所示

将xgboost作为xg导入

enter image description here

任何形式的帮助都将不胜感激

我也尝试过以下命令,但没有成功

===========================================================================

sudo apt get安装make

sudo apt获取更新

sudo apt get安装gcc

sudo apt get install g++

sudo apt get安装git

sudo git克隆https://github.com/dmlc/xgboost

cd XG增压

苏多/建筑.sh在

cd python包

sudo/home/username/anaconda2/bin/python设置.py安装

===========================================================================

谢谢你的时间。。。在


Tags: iogit命令httpget链接readthedocssudo
2条回答

这个link帮助我解决了Gomp问题,因为我最终加载了xboost并能够执行“将XGBoost安装到训练集”:

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

不幸的是,classifier.fit(X_train,y_train)使脚本崩溃,说“必须重新加载内核”

现在就去做

这是一个迟来的答案,但对未来的人来说。我也遇到过同样的问题,但是对于Java上的XGBoost。结果是libgomp是必需的。在Debian上,只需要一个apt-get install -y libgomp1就可以了。在

相关问题 更多 >