安装Xgboost的一些坑

环境:windows7 32位 python 2.7python

准备安装最新的0.6,可是坑了。。。。git

首先是觉得能够pip安装,很开心,然而并不行,原来文档上有这么一句话:github

  • Note for windows users: this pip installation may not work on some windows environment, and it may cause unexpected errors. pip installation on windows is currently disabled for further investigation, please install from github.

。。。。。。please install from github,仍是得编译windows

 

这个是github上的安装向导:app

https://github.com/dmlc/xgboost/blob/master/doc/build.mdui

image

推荐使用MinGW编译,然而我不想装那东西,感受用不上,准备使用vs编译,然而我并无发现文档中所说的.sln文件,坑。。。。this

很好,成功入坑,而后搜索到python 3.5/3.6使用的有现成的whl文件,太幸福了。。。然而个人版本是2.7code

python扩展库地址:http://www.lfd.uci.edu/~gohlke/pythonlibs/#xgboostblog

而后发现网上不少教程有个windows文件夹,然而0.6版本貌似移除了。。。。教程

而后下载了0.47版本的代码,使用vs打开了其中的.sln文件,编译了xgboost_wrapper项目,生成了Xgboost_XXX.dll,将其拷贝到wrapper文件夹,在python-package目录下使用setup.py,加参数install(具体以下),安装成功。

python setup.py install

以上就是踩的坑。。。。。套路深

相关文章
相关标签/搜索