在 32 位系统中为 python 编译 Xgboost 库

Compiling Xgboost library for python in 32 bit system

我正尝试在我的 32 位 Windows 上按照以下说明进行操作,摘自 :

  1. cd c:\
  2. git 克隆 --recursive https://github.com/dmlc/xgboost
  3. cd xgboost
  4. git 子模块初始化
  5. git 子模块更新
  6. cp make/mingw64.mk config.mk
  7. 制作-j4

但是我得到这样的错误:

$ cp make/mingw64.mk config.mk; make -j4
g++ -m64 -std=c++0x -Wall -O3 -msse2  -Wno-unknown-pragmas -funroll-loops -Iinclude -DDMLC_ENABLE_STD_THREAD=0  -Idmlc-core/include -Irabit/include -fopenmp -MM -MT build/learner.o src/learner.cc >build/learner.d
g++ -m64 -std=c++0x -Wall -O3 -msse2  -Wno-unknown-pragmas -funroll-loops -Iinclude -DDMLC_ENABLE_STD_THREAD=0  -Idmlc-core/include -Irabit/include -fopenmp -MM -MT build/logging.o src/logging.cc >build/logging.d
g++ -m64 -std=c++0x -Wall -O3 -msse2  -Wno-unknown-pragmas -funroll-loops -Iinclude -DDMLC_ENABLE_STD_THREAD=0  -Idmlc-core/include -Irabit/include -fopenmp -MM -MT build/common/common.o src/common/common.cc >build/common/common.d
g++ -m64 -std=c++0x -Wall -O3 -msse2  -Wno-unknown-pragmas -funroll-loops -Iinclude -DDMLC_ENABLE_STD_THREAD=0  -Idmlc-core/include -Irabit/include -fopenmp -MM -MT build/c_api/c_api_error.o src/c_api/c_api_error.cc >build/c_api/c_api_error.d
cc1plus.exe: sorry, unimplemented: 64-bit mode not compiled in
cc1plus.exe: sorry, unimplemented: 64-bit mode not compiled in
cc1plus.exe: sorry, unimplemented: 64-bit mode not compiled in
Makefile:97: recipe for target 'build/logging.o' failed
mingw32-make:  [build/logging.o] Error 1
mingw32-make:  Waiting for unfinished jobs....
Makefile:97: recipe for target 'build/common/common.o' failed
mingw32-make:  [build/common/common.o] Error 1
cc1plus.exe: sorry, unimplemented: 64-bit mode not compiled in
Makefile:97: recipe for target 'build/learner.o' failed
mingw32-make:  [build/learner.o] Error 1
Makefile:97: recipe for target 'build/c_api/c_api_error.o' failed
mingw32-make:  [build/c_api/c_api_error.o] Error 1

如何让它在我的 32 位机器上运行? github

上的问题

只需使用 whl 包:pip install some-package.whl

您可以在这里下载 Xgboost https://www.lfd.uci.edu/~gohlke/pythonlibs/