Python xgboost错误:不是有效的Win32应用程序

Python xgboost错误:不是有效的Win32应用程序,python,xgboost,Python,Xgboost,我想使用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 UN

我想使用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.core.XGBoostError 无法加载XGBoost库(XGBoost.dll)。可能原因:*OpenMP 未安装运行时(适用于Windows的vcomp140.dll或libgomp-1.dll,
libgomp.so对于类UNIX操作系统)*您正在64位操作系统上运行32位Python 操作系统错误消息:['[WinError 193]%1不是有效的Win32应用程序'] 文件“G:\study\research\gbm\freezed importlib.\u bootstrap”,第205行, 在已删除帧的情况下调用 文件“G:\study\research\gbm\freezed importlib.\u bootstrap\u external”, 第678行,在exec_模块中 文件“G:\study\research\gbm\freezed importlib._bootstrap”,第655行, 在(加载)中(未锁定) 文件“G:\study\research\gbm\freezed importlib.\u bootstrap”,第950行, 在"查找"和"加载"中解锁 文件“G:\study\research\gbm\freezed importlib.\u bootstrap”,第961行, 在“查找”和“加载”中 文件“G:\study\research\gbm\freezed importlib.\u bootstrap”,第205行, 在已删除帧的情况下调用 文件“G:\study\research\gbm\freezed importlib.\u bootstrap\u external”, 第678行,在exec_模块中 文件“G:\study\research\gbm\freezed importlib._bootstrap”,第655行, 在(加载)中(未锁定) 文件“G:\study\research\gbm\freezed importlib.\u bootstrap”,第950行, 在"查找"和"加载"中解锁 文件“G:\study\research\gbm\freezed importlib.\u bootstrap”,第961行, 在“查找”和“加载”中 文件“G:\Study\Research\GBM\GBM.py”,第4行,在 从xgboost导入XGBClassifier
我安装了xgboost,下载了dll文件并安装了它

对我来说,即使所有的东西都是64位的,我仍然会遇到这个错误


<> P>最后,我发现<强> XGBOOST需要安装在Windows机器上的VisualStudio 2017 C++重新分发。< /强> ./P>“您在64位OS上运行32位Python”,您能检查一下安装了64位Python和XGBooST吗?是的,我检查过了。它是32位的。我现在能做什么?删除它并安装正确的版本,如错误中所述,是哪一个python还是xgboost?python