如何在windows下安裝xgboost庫

來源:互聯網
上載者:User

標籤:整合學習   xgboost   

(0)前提是,你得下載好anaconda,並且安裝之,我的如下(python3 windows 64位)

https://repo.continuum.io/archive/Anaconda3-4.4.0-Windows-x86_64.exe

(1)下載xgboost源碼(這裡直接用官方最新的源碼,這裡我們不需要用git clone --recursive,因為用的是編譯好的dll,因此不需要下載那麼完整,只需要python-package完整即可),你可以通過下面的串連下載源碼即可。

https://github.com/dmlc/xgboost/archive/master.zip

(3)解壓下載好的源碼

解壓之後,進入檔案夾,找到master\python-package\xgboost目錄

(4)下載windows下的編譯好的xgboost庫檔案

選擇最新的編譯的dll,也就是當前源碼對應的那一天的dll

大家請在頁面:http://ssl.picnet.com.au/xgboost/20180515/x64/xgboost.dll

選擇最新編譯的dll,因為最新的dll與xgboost的源碼更為適配。

下載好之後將這個庫檔案放入到master\python-package\xgboost目錄

注意:如果你有NVIDIA的GPU,可以下載http://ssl.picnet.com.au/xgboost/20170610/x64_gpu/libxgboost.dll,這個是GPU版本的動態連結程式庫

(5)安裝xgboost即可

進入master\python-package目錄,執行以下命令列

python setup.py install
注意這裡的python必須使用 anaconda下面的那個python.exe 需要設定環境變數 否則不能使用 anaconda裡面裝上的numpy庫

即可完成安裝

如何在windows下安裝xgboost庫

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.