我正在用XGBoost做实验,却被一个我搞不懂的错误所阻碍。我已经在活动环境中安装了sklearn,并且可以通过在同一个笔记本上训练sklearn来验证它。当我试图训练一个XGBoost模型时,我得到了误差XGBoostError: sklearn needs to be installed in order to use this module
这样做是可行的:
clf = RandomForestClassifier(n_estimators=200, random_state=0, n_jobs=-1)
这会引发异常:
clf = xgb.XGBClassifier(max_depth=
有没有人想过如何使XGboost与苹果M1?协同工作
我尝试过多种方法来修复它,但它不起作用。
我试过重新安装它;pip和pip3以及python -m pip和conda安装;brew安装limpomp;brew安装gcc@8;下载源代码并在本地编译。
XGboost似乎不适用于苹果M1。
这里是错误,当我在我的脚本:中导入xgboost时会发生这种情况
XGBoostError: XGBoost Library (libxgboost.dylib) could not be loaded.
Likely causes:
* OpenMP runtime is not installed
我正在尝试在我的anaconda (python3.5,mac OSX)上安装xgboost。
conda install -c aterrel xgboost=0.4.0
看起来xgboost包不支持python3.5??
UnsatisfiableError: The following specifications were found to be in conflict:
- python 3.5*
- xgboost 0.4.0*
如果有人能帮上忙,我将不胜感激。如何使用conda install安装包?
我正在尝试使用streamlit部署一个xgboost型分类器。我在另一个文件夹中的jupyter笔记本文件中训练了模型。在包含streamlit python脚本的文件夹中,我安装了venv和im,并通过虚拟环境运行该应用程序。streamlit工作得很好,但是当我尝试使用加载的pickle文件进行预测时,我得到了一个错误‘no module named xgboost’in it。因此,我确实在虚拟环境中安装了xgboost,当我再次尝试运行时,我收到错误消息‘super has no attribute get _params’。
和用于导入pickled模型的代码
data
我一直试图在我的mac上安装Python2.7 XGBoost。我正在通过brew运行python框架构建,并试图安装到虚拟环境中。我尝试了以下方法:
在这里找到手动构建:
这将导致此错误:
error: Error: setup script specifies an absolute path:
/Users/username/git/xgboost/python-package/xgboost/../../lib/libxgboost.so
setup() arguments must *always* be /-separated paths relative to t
我正试图在Mac上安装py-xgboost-gpu,就像XGBoost在上指示的那样,但我得到了一个PackagesNotFoundError
我在跑
conda install -c conda-forge py-xgboost-gpu
和得到
PackagesNotFoundError: The following packages are not available from current channels:
- py-xgboost-gpu
知道为什么吗?
我通过pip安装了xgboost,并尝试在Jupyter Notebook上运行它。但是,当运行
from xgboost import XGBClassifier
在Python 3 jupyter笔记本上,我得到以下错误:
OSError: /home/martin/anaconda3/bin/../lib/libgomp.so.1: version GOMP_4.0' not found (required by /home/martin/anaconda3/lib/python3.6/site-packages/xgboost/./lib/libxgboost.so)
我做什么
伙计们
我正在尝试安装启用gpu的xgboost版本,我遵循了这个说明中的正确步骤。()
git clone https://github.com/dmlc/xgboost.git xgboost_install_dir copy libxgboost.dll (downloaded from this page) into the xgboost_install_dir\python-package\xgboost\ directory cd xgboost_install_dir\python-package\ python setup.py install
现在,在运行所有这些步骤之后,
我正在尝试在aws EC2中安装xgboost并在Jupyter笔记本中使用它。到目前为止,我可以使用简单的pip install xgboost安装它。当我在终端中运行它时,没有问题。但是当我尝试在Jupyter笔记本上运行它时,我得到了错误:ImportError: No module named 'xgboost'。你知道为什么会这样吗?
我希望你能帮助我。谢谢!