window10 安装python xgboost出现WindowsError: [Error 126]
2017-11-16 23:04
591 查看
windows10之上python安装xgboost采用如下步骤(https://stackoverflow.com/questions/33749735/how-to-install-xgboost-package-in-python-windows-platform):
download xgboost whl file from here (make
sure to match your python version and system architecture, e.g. "xgboost-0.6-cp35-cp35m-win_amd64.whl" for python 3.5 on 64-bit machine)
open command prompt
your Downloads folder (or wherever you saved the whl file)
安装成功之后,import xgboost时,报如下错误信息:
import xgboost as xgb
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "xgboost\__init__.py", line 11, in <module>
from .core import DMatrix, Booster
File "xgboost\core.py", line 115, in <module>
_LIB = _load_lib()
File "xgboost\core.py", line 109, in _load_lib
lib = ctypes.cdll.LoadLibrary(lib_path[0])
File "C:\Python27\lib\ctypes\__init__.py", line 444, in LoadLibrary
return self._dlltype(name)
File "C:\Python27\lib\ctypes\__init__.py", line 366, in __init__
self._handle = _dlopen(self._name, mode)
WindowsError: [Error 126]
造成该问题的原因为:电脑缺少VC++相关运行库。
解决方法:下载VC++运行库,64位版本下载地址为 https://www.microsoft.com/zh-cn/download/confirmation.aspx?id=48145
download xgboost whl file from here (make
sure to match your python version and system architecture, e.g. "xgboost-0.6-cp35-cp35m-win_amd64.whl" for python 3.5 on 64-bit machine)
open command prompt
cdto
your Downloads folder (or wherever you saved the whl file)
pip install xgboost-0.6-cp35-cp35m-win_amd64.whl(or whatever your whl file is named)
安装成功之后,import xgboost时,报如下错误信息:
import xgboost as xgb
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "xgboost\__init__.py", line 11, in <module>
from .core import DMatrix, Booster
File "xgboost\core.py", line 115, in <module>
_LIB = _load_lib()
File "xgboost\core.py", line 109, in _load_lib
lib = ctypes.cdll.LoadLibrary(lib_path[0])
File "C:\Python27\lib\ctypes\__init__.py", line 444, in LoadLibrary
return self._dlltype(name)
File "C:\Python27\lib\ctypes\__init__.py", line 366, in __init__
self._handle = _dlopen(self._name, mode)
WindowsError: [Error 126]
造成该问题的原因为:电脑缺少VC++相关运行库。
解决方法:下载VC++运行库,64位版本下载地址为 https://www.microsoft.com/zh-cn/download/confirmation.aspx?id=48145
相关文章推荐
- windows下Python机器学习依赖库安装——numpy、scipy、sklearn、xgboost、theano等
- windows下python安装xgboost
- Windows 下安装 xgboost for python
- 关于windows安装python过程中出现error 2503 2502错误的解决方法
- windows 新版xgboost Python包安装教程 win10 64
- [Python] xgboost在windows上的安装
- windows和python2.7下xgboost的快速安装方法
- Windows下安装python版的XGBoost教程(基于Anaconda)
- windows安装python和xgboost
- windows下安装xgboost for python 的简单方法
- windows在python安装使用xgboost走了些弯路
- Windows下安装python版的XGBoost教程(Anaconda)
- Windows下python的xgboost-0.47安装
- Windows下安装XGBoost(python基于Anaconda2)
- 64 位 windows 下 安装 xgboost python版本
- 关于windows安装python过程中出现error 2503 2502错误的解决方法
- python+xgboost在windows上的安装和使用
- xgboost学习之windows下python版本安装
- windows(64位)下用GPU版本的mxnet配置(绑定python)+xgboost快速安装使用
- 当安装好Xgboost后当调用其函数出现``` AttributeError: module 'xgboost' has no attribute 'feature_importance_'