Windows xgboost错误 [英] Windows xgboost error

查看:78
本文介绍了Windows xgboost错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

仅仅安装xgboost库很痛苦,但是现在在Windows 8.1 64位上发生了其他错误

It was a pain just to install xgboost library, but now other mistake happened on Windows 8.1 64-bit

import xgboost as xgb

Traceback (most recent call last):
  File "C:/Users/Пашка/PycharmProjects/kaggler bank santander/1.py", line 12, in <module>
    import xgboost as xgb
  File "C:\Python34\lib\site-packages\xgboost-0.4-py3.4.egg\xgboost\__init__.py", line 11, in <module>
    from .core import DMatrix, Booster
  File "C:\Python34\lib\site-packages\xgboost-0.4-py3.4.egg\xgboost\core.py", line 83, in <module>
    _LIB = _load_lib()
  File "C:\Python34\lib\site-packages\xgboost-0.4-py3.4.egg\xgboost\core.py", line 77, in _load_lib
    lib = ctypes.cdll.LoadLibrary(lib_path[0])
  File "C:\Python34\lib\ctypes\__init__.py", line 429, in LoadLibrary
    return self._dlltype(name)
  File "C:\Python34\lib\ctypes\__init__.py", line 351, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: [WinError 193] %1 is not a valid Win32 application

该怎么办?我认为这是因为我猜Windows中如何关联.py文件

What can be done? I think it is because of how .py files associated in Windows I guess

推荐答案

我认为,可以在这里找到安装xgboost的最简单(最轻松)的方法:

I think that probably the simplest (most painless) way to install xgboost can be found here:

https://dnc1994.com/2016/03/installing-xgboost -on-windows/(非常感谢作者!)

在遵循他们的指示之前,我按照作者的建议下载了TDM-GCC.

I downloaded TDM-GCC as recommended by the author prior to following their instructions.

此外,我在32位Python上安装xgboost时遇到了类似的问题,但是在使用64位Python时却没有问题.

Also, I had similar issues installing xgboost on 32-bit Python but am having no issues using 64-bit Python.

注意:我正在Windows 7上运行Python 2.7.

Note: I'm running Python 2.7 on Windows 7.

这篇关于Windows xgboost错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆