将xgboost导入python 2.7

时间:2017-07-06 22:04:33

标签: python-2.7 xgboost

我正在尝试在python上安装xgboost(2.7,使用Spyder,因为它附带Anaconda)。

我跑了:

conda install -c mndrake xgboost

并成功完成。但是当我尝试导入模块时,我得到:

import xgboost as xgb
Traceback (most recent call last):

File "<ipython-input-10-745aa3a2d734>", line 1, in <module>
import xgboost as xgb

File "C:\Users\QP19\AppData\Local\Continuum\Anaconda2\lib\site-
packages\xgboost\__init__.py", line 11, in <module>
from .core import DMatrix, Booster

File "C:\Users\QP19\AppData\Local\Continuum\Anaconda2\lib\site-
packages\xgboost\core.py", line 112, in <module>
_LIB = _load_lib()

File "C:\Users\QP19\AppData\Local\Continuum\Anaconda2\lib\site-
packages\xgboost\core.py", line 106, in _load_lib
lib = ctypes.cdll.LoadLibrary(lib_path[0])

File "C:\Users\QP19\AppData\Local\Continuum\Anaconda2\lib\ctypes\__init__.py", 
line 440, in LoadLibrary
return self._dlltype(name)

File "C:\Users\QP19\AppData\Local\Continuum\Anaconda2\lib\ctypes\__init__.py", 
line 362, in __init__
self._handle = _dlopen(self._name, mode)

WindowsError: [Error 126] The specified module could not be found

我该如何解决这个问题?

0 个答案:

没有答案