{"id":270564,"date":"2015-12-17T14:08:02","date_gmt":"2015-12-17T11:08:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=270564"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=270564","title":{"rendered":"\u0421\u0431\u043e\u0440\u043a\u0430 XGBoost \u0434\u043b\u044f Python \u043f\u043e\u0434 Windows"},"content":{"rendered":"<p>       <i>Windows is so evil that consumes extra energy to make the things running.<\/i><\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/420\/763\/71c\/42076371c9634d68b5a32622c70cb1bf.png\"\/> <\/p>\n<p>  \u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 <a href=\"https:\/\/github.com\/dmlc\/xgboost\">XGBoost<\/a> \u0433\u0440\u0435\u043c\u0438\u0442 \u043d\u0430 \u0432\u0441\u0435\u0445 \u0441\u043e\u0440\u0435\u0432\u043d\u043e\u0432\u0430\u043d\u0438\u044f\u0445 \u043f\u043e \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u043c\u0443 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044e \u0438 \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u0437\u0430\u0432\u043e\u0451\u0432\u044b\u0432\u0430\u0442\u044c \u043f\u0440\u0438\u0437\u043e\u0432\u044b\u0435 \u043c\u0435\u0441\u0442\u0430. \u041e\u0434\u043d\u0430\u043a\u043e, \u0441\u0442\u0430\u0442\u044c \u043e\u0431\u043b\u0430\u0434\u0430\u0442\u0435\u043b\u0435\u043c \u044d\u0442\u043e\u0433\u043e \u043f\u0430\u043a\u0435\u0442\u0430 \u0434\u043b\u044f Python \u043f\u043e\u0434 Windows \u043d\u0435 \u0442\u0430\u043a \u043f\u0440\u043e\u0441\u0442\u043e.<\/p>\n<p>  \u041f\u0440\u043e\u0446\u0435\u0441\u0441 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0441\u043a\u0443\u0434\u043d\u043e \u043e\u043f\u0438\u0441\u0430\u043d \u043d\u0430 <a href=\"https:\/\/github.com\/dmlc\/xgboost\/tree\/master\/windows\">GitHub<\/a> \u0438 \u043d\u0435\u043c\u043d\u043e\u0433\u0438\u043c \u0448\u0438\u0440\u0435 \u043d\u0430<a href=\"https:\/\/www.kaggle.com\/c\/otto-group-product-classification-challenge\/forums\/t\/13043\/run-xgboost-from-windows-and-python\"> \u0444\u043e\u0440\u0443\u043c\u0435 Kaggle<\/a>. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u044e \u043e\u043f\u0438\u0441\u0430\u0442\u044c \u043f\u043e\u0448\u0430\u0433\u043e\u0432\u043e \u0438 \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e. \u041d\u0430\u0434\u0435\u044e\u0441\u044c \u044d\u0442\u043e \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043c\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043d\u0435\u043e\u043f\u044b\u0442\u043d\u044b\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c.<br \/>  <a name=\"habracut\"><\/a><br \/>  \u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c \u0443 \u0432\u0430\u0441 \u0443\u0436\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d Python. \u0412 \u043c\u043e\u0451\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044d\u0442\u043e \u0441\u0431\u043e\u0440\u043a\u0430 <a href=\"https:\/\/www.continuum.io\/downloads\">Anaconda<\/a> \u0441 Python 3.4.<\/p>\n<p>  <b>1. \u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c<\/b> <a href=\"http:\/\/www.oracle.com\/technetwork\/java\/javase\/downloads\/index.html\">JDK<\/a> \u043e\u0442 Oracle. \u041f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0434\u043b\u044f \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 \u043d\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 JNI.<\/p>\n<p>  <b>2. \u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c<\/b> <a href=\"https:\/\/www.visualstudio.com\/en-us\/news\/vs2013-community-vs.aspx\">Visual Studio 2013<\/a> \u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0435 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0439 \u043d\u0430 \u0441\u043a\u0440\u0438\u043d\u0448\u043e\u0442\u0435. \u0411\u043e\u043b\u0435\u0435 \u043f\u043e\u0437\u0434\u043d\u0438\u0435 \u0432\u0435\u0440\u0441\u0438\u0438 \u043f\u0440\u043e\u0441\u044f\u0442 \u043f\u0440\u0430\u0432\u0438\u0442\u044c \u043a\u043e\u0434 \u0440\u0435\u0448\u0435\u043d\u0438\u044f, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u043b\u044f \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u043b\u044e\u0434\u0435\u0439 \u043d\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0442. \u0421\u0430\u043c\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u0435 xgboost, \u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u043d\u043d\u043e\u0435 \u043d\u0430 GitHub, \u0441\u043e\u0431\u0440\u0430\u043d\u043e \u0432 Visual Studio 2010.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/df9\/d07\/170\/df9d07170bcd4c5b9d132d6885d6654d.png\"\/><\/p>\n<p>  <b>3. \u0421\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u043c<\/b> \u0432\u0441\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 XGBoost c <a href=\"https:\/\/github.com\/dmlc\/xgboost\">GitHub<\/a>:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/1c4\/7b4\/4bc\/1c47b44bce714c5189f05a42ab9e417a.png\"\/><\/p>\n<p>  <b>4. \u0420\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u044b\u0432\u0430\u0435\u043c<\/b> \u0430\u0440\u0445\u0438\u0432, \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043f\u0430\u043f\u043a\u0443 <i>C:\\xgboost-master<\/i>.<\/p>\n<p>  <b>5. \u041e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c<\/b> \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Visual Studio \u0444\u0430\u0439\u043b \u0440\u0435\u0448\u0435\u043d\u0438\u044f <i>C:\\xgboost-master\\windows\\<\/i><b>xgboost.sln<\/b>. \u0412\u044b\u0431\u0438\u0440\u0430\u0435\u043c Release \u0438 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b, \u043f\u043e\u0434 \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0431\u0443\u0434\u0435\u043c \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c. \u0414\u0430\u043b\u0435\u0435 Build -&gt; Build Solution. \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u00ab4 succeeded\u00bb:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/9cb\/ae3\/633\/9cbae36334854d719612a12d53404bc6.png\"\/><\/p>\n<p>  \u0423\u0436\u0435 \u043d\u0430 \u044d\u0442\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b.<\/p>\n<p>  \u00ab\u041d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u0442\u044c CL.exe\u00bb \u2014 \u043f\u0440\u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 \u043d\u0435 \u0431\u044b\u043b \u0432\u044b\u0431\u0440\u0430\u043d C#\/Visual C++. \u0414\u043e\u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b.<\/p>\n<p>  \u00abCannot open include file: &#8216;corecrt.h&#8217;\u00bb \u2014 \u0438\u0449\u0435\u0442\u0435 \u0444\u0430\u0439\u043b \u043f\u043e\u0438\u0441\u043a\u043e\u043c, \u0441\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e \u043e\u043d \u0442\u0443\u0442: <i>ProgramFiles(x86)\\Windows Kits\\10\\Include\\10.0.10150.0\\ucrt<\/i> \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442\u0435 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e \u0432 $IncludePath, \u043b\u0438\u0431\u043e \u043f\u043e\u0441\u0442\u0443\u043f\u0430\u0435\u0442\u0435 \u0433\u0440\u0443\u0431\u043e \u0438 \u043a\u043e\u043f\u0438\u0440\u0443\u0435\u0442\u0435 \u0432\u0441\u0435 *.h \u0444\u0430\u0439\u043b\u044b \u043a\u0443\u0434\u0430-\u043d\u0438\u0431\u0443\u0434\u044c \u043d\u0430 \u0432\u0438\u0434\u043d\u043e\u0435 \u043c\u0435\u0441\u0442\u043e, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0432<i> Program Files\\Microsoft Visual Studio 12.0\\VC\\include<\/i>.<\/p>\n<p>  \u00abCannot open include file: &#8216;jni.h&#8217;\u00bb \u2014 \u043f\u043e\u0441\u043b\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 JDK \u043e\u0448\u0438\u0431\u043a\u0438 \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c.<\/p>\n<p>  \u041e\u0434\u043d\u0430\u043a\u043e \u0432\u0441\u0451 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u043e\u0439\u0442\u0438 \u0433\u043b\u0430\u0434\u043a\u043e \u0438 \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u043d\u0435 \u0431\u0443\u0434\u0435\u0442. \u0423 \u043c\u0435\u043d\u044f \u043f\u043e\u043b\u0443\u0447\u0430\u043b\u043e\u0441\u044c \u0438 \u0442\u0430\u043a, \u0438 \u0442\u0430\u043a, \u043d\u0430 \u0440\u0430\u0437\u043d\u044b\u0445 \u042d\u0412\u041c.<\/p>\n<p>  \u0414\u0430\u043b\u0435\u0435.<\/p>\n<p>  <b>6. \u0418\u0437 \u043f\u0430\u043f\u043a\u0438<\/b> <i>C:\\xgboost-master\\windows\\Release<\/i> \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u044b \u0444\u0430\u0439\u043b\u044b <b>xgboost.exe<\/b> \u0438 <b>xgboost_wrapper.dll<\/b>.<br \/>  \u041a\u043e\u043f\u0438\u0440\u0443\u0435\u043c \u0438\u0445 \u0432 \u043f\u0430\u043f\u043a\u0443 \u0441 \u043f\u0430\u043a\u0435\u0442\u043e\u043c \u0434\u043b\u044f Python: C:\\xgboost-master\\python-package.<\/p>\n<p>  <b>7. \u041e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c<\/b> \u043a\u043e\u043d\u0441\u043e\u043b\u044c (cmd), \u043c\u0435\u043d\u044f\u0435\u043c \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e: <br \/>  <code> cd &quot;C:\\xgboost-master\\python-package&quot; <\/code><\/p>\n<p>  <b>8. \u0422\u0430\u043c \u0436\u0435<\/b> \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0449\u0438\u043a:<br \/>  <code> python setup.py install <\/code><\/p>\n<p>  \u0412\u043e\u0442 \u0438 \u0432\u0441\u0451. \u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0435 \u0443\u0434\u043e\u0431\u043d\u0443\u044e \u0432\u0430\u043c \u0441\u0440\u0435\u0434\u0443 Python \u0438 \u043f\u0438\u0448\u0435\u0442\u0435 \u0442\u0440\u0430\u0434\u0438\u0446\u0438\u043e\u043d\u043d\u043e\u0435:<\/p>\n<pre><code class=\"python\">import xgboost as xgb <\/code><\/pre>\n<div class=\"clear\"><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/273363\/\"> http:\/\/habrahabr.ru\/post\/273363\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>       <i>Windows is so evil that consumes extra energy to make the things running.<\/i><\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/420\/763\/71c\/42076371c9634d68b5a32622c70cb1bf.png\"\/> <\/p>\n<p>  \u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 <a href=\"https:\/\/github.com\/dmlc\/xgboost\">XGBoost<\/a> \u0433\u0440\u0435\u043c\u0438\u0442 \u043d\u0430 \u0432\u0441\u0435\u0445 \u0441\u043e\u0440\u0435\u0432\u043d\u043e\u0432\u0430\u043d\u0438\u044f\u0445 \u043f\u043e \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u043c\u0443 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044e \u0438 \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u0437\u0430\u0432\u043e\u0451\u0432\u044b\u0432\u0430\u0442\u044c \u043f\u0440\u0438\u0437\u043e\u0432\u044b\u0435 \u043c\u0435\u0441\u0442\u0430. \u041e\u0434\u043d\u0430\u043a\u043e, \u0441\u0442\u0430\u0442\u044c \u043e\u0431\u043b\u0430\u0434\u0430\u0442\u0435\u043b\u0435\u043c \u044d\u0442\u043e\u0433\u043e \u043f\u0430\u043a\u0435\u0442\u0430 \u0434\u043b\u044f Python \u043f\u043e\u0434 Windows \u043d\u0435 \u0442\u0430\u043a \u043f\u0440\u043e\u0441\u0442\u043e.<\/p>\n<p>  \u041f\u0440\u043e\u0446\u0435\u0441\u0441 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0441\u043a\u0443\u0434\u043d\u043e \u043e\u043f\u0438\u0441\u0430\u043d \u043d\u0430 <a href=\"https:\/\/github.com\/dmlc\/xgboost\/tree\/master\/windows\">GitHub<\/a> \u0438 \u043d\u0435\u043c\u043d\u043e\u0433\u0438\u043c \u0448\u0438\u0440\u0435 \u043d\u0430<a href=\"https:\/\/www.kaggle.com\/c\/otto-group-product-classification-challenge\/forums\/t\/13043\/run-xgboost-from-windows-and-python\"> \u0444\u043e\u0440\u0443\u043c\u0435 Kaggle<\/a>. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u044e \u043e\u043f\u0438\u0441\u0430\u0442\u044c \u043f\u043e\u0448\u0430\u0433\u043e\u0432\u043e \u0438 \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e. \u041d\u0430\u0434\u0435\u044e\u0441\u044c \u044d\u0442\u043e \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043c\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043d\u0435\u043e\u043f\u044b\u0442\u043d\u044b\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c.  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-270564","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/270564","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=270564"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/270564\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=270564"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=270564"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=270564"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}