我想使用XGBoost。当我尝试执行代码时,它总是显示下面给出的错误。
Exception has occurred: xgboost.core.XGBoostError
XGBoost Library (xgboost.dll) could not be loaded. Likely causes: * OpenMP
runtime is not installed (vcomp140.dll or libgomp-1.dll for Windows,
libgomp.so for UNIX-like OSes) * You are running 32-bit Python on a 64-bit
OS Error message(s): ['[WinError 193] %1 is not a valid Win32 application']
File "G:\study\research\gbm\<frozen importlib._bootstrap>", line 205,
in _call_with_frames_removed
File "G:\study\research\gbm\<frozen importlib._bootstrap_external>",
line 678, in exec_module
File "G:\study\research\gbm\<frozen importlib._bootstrap>", line 655,
in _load_unlocked
File "G:\study\research\gbm\<frozen importlib._bootstrap>", line 950,
in _find_and_load_unlocked
File "G:\study\research\gbm\<frozen importlib._bootstrap>", line 961,
in _find_and_load
File "G:\study\research\gbm\<frozen importlib._bootstrap>", line 205,
in _call_with_frames_removed
File "G:\study\research\gbm\<frozen importlib._bootstrap_external>",
line 678, in exec_module
File "G:\study\research\gbm\<frozen importlib._bootstrap>", line 655,
in _load_unlocked
File "G:\study\research\gbm\<frozen importlib._bootstrap>", line 950,
in _find_and_load_unlocked
File "G:\study\research\gbm\<frozen importlib._bootstrap>", line 961,
in _find_and_load
File "G:\Study\Research\GBM\gbm.py", line 4, in <module>
from xgboost import XGBClassifier我安装了xgboost,下载了dll文件并安装了它。
发布于 2019-02-20 12:18:16
对我来说,即使一切都是64位的,我仍然有这个错误。
最后,我发现XGBoost需要安装在windows机器.中的VisualStudio2017 C++可再发行版。
https://stackoverflow.com/questions/52550977
复制相似问题