ImportError: cannot import name 'CUDF_INSTALLED' from 'xgboost.compat'

ImportError: cannot import name 'CUDF_INSTALLED' from 'xgboost.compat'

晚上好。

我刚刚通过 anaconda 帮助某人安装了 xgboost,方法是使用以下行:

conda install -c conda-forge xgboost

标题中的那一行是我得到的:

ImportError: cannot import name 'CUDF_INSTALLED' from 'xgboost.compat' (/opt/anaconda3/lib/python3.8/site-packages/xgboost/compat.py)

Google 没有提供很多关于如何处理此特定错误消息的见解。

什么会导致这个问题?

我安装了 xgboost 使用:

brew install xgboost

然后我得到了同样的错误。关闭所有 运行 个 jupyter 笔记本并重新启动 anaconda。对我有用。