安裝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

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

相關文章
相關標籤/搜索