2016-03-27 30 views
0

我想在64位Windows 10中爲Anaconda Python 3.x編譯xgboost,所以我按照這裏的步驟 - https://xgboost.readthedocs.org/en/latest/build.html#building-on-windows和這裏 - Install xgboost under python with 64-bit msys failing。使用64位的MinGW G ++,我得到了以下錯誤消息,當「讓-j4」使用mingw64.mk:使用64位mingw構建xgboost失敗g ++

g++: error: dmlc-core/libdmlc.a: No such file or directory 
g++: error: rabit/lib/librabit_empty.a: No such file or directory 
Makefile:120: recipe for target 'lib/libxgboost.dll' failed 
mingw32-make: *** [lib/libxgboost.dll] Error 1 

能否請您讓我知道這是怎麼回事,我該如何解決這個問題?

非常感謝。

回答

0

你必須先進入dmlc-core和rabit子目錄並執行make。然後來到xgboost庫並執行build.sh。

0

運行安裝時可能你沒有在正確的文件夾中。嘗試以下操作。

拉起蟒蛇提示符下運行:

cd xgboost\python-package 
python setup.py install 

如果這仍然失敗,請嘗試從頭the process in this link,它應該工作。從鏈接引用:

首先遵循以下程序(在Windows上的Git bash)的官方指南:

git clone --recursive https://github.com/dmlc/xgboost 
git submodule init 
git submodule update 

然後安裝TDM-GCC這裏並執行以下操作Git中的Bash:

alias make='mingw32-make' 
cp make/mingw64.mk config.mk; make -j4 

最後,請執行以下操作使用anaconda提示或混帳擊:

cd xgboost\python-package 
python setup.py install 
0

你缺少您的目錄中的庫。您必須遞歸克隆xgboost以包含它們。只需按照安裝指南中提到的克隆過程操作即可,您應該沒問題!