1. 程式人生 > >安裝xgboost遇錯xgboost.libpath.XGBoostLibraryNotFound: Cannot find XGBoost Library in the candidate path

安裝xgboost遇錯xgboost.libpath.XGBoostLibraryNotFound: Cannot find XGBoost Library in the candidate path

問題

安裝好xgboost,但是在跑程式時遇到如下的報錯情況

解決方案

1.在連結http://www.picnet.com.au/blogs/guido/2016/09/22/xgboost-windows-x64-binaries-for-download/中下載最新版本的xgboost.dll.

2.根據提示將下載的xgboost.dll放置到C:\Users\Administrator\AppData\Roaming\Python\Python35\site-packages\xgboost下,

3.在cmd中執行如下命令列,其中./build.sh可能執行 不過去,執行不過去的話就修改為bulid.sh試試,不行的話就算了,執行好其他步就得了。

git clone --recursive https://github.com/dmlc/xgboost.git
cd xgboost
./build.sh
cd python-package
python setup.py install

4.此時xgboost應該就可以了,不行的話就重啟電腦吧。