我的 mac 上安装了 xgboost 库,但突然出现了 python 错误: ModuleNotFoundError: No module named 'xgboost'
这就是我执行的:
pip install xgboost
conda install xgboost
pip3 install xgboost
sudo pip3 install xgboost
但是,我总是收到以下错误:
你能帮我一把吗?
非常感谢你
如果您有包管理器 Anaconda,请使用:
conda install -c conda-forge xgboost
要么:
$ brew install gcc@5
$ pip install xgboost
如果已经安装,请尝试:
pip install --upgrade setuptools
要么:
python -m pip install --upgrade pip
pip install xgboost
要么:
如果您使用的是 pip,请尝试使用 pip3 或 pip2
pip2 install xgboost
pip3 install xgboost
这是您的问题:https : //github.com/dmlc/xgboost/issues/3194
简而言之:从以下位置下载 gboost:
https://github.com/dmlc/xgboost/files/1851733/xgboost-0.7.post5.tar.gz
然后运行:
pip3 install xgboost-0.7.post5.tar.gz
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句