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

时间:2016-03-15 09:11:16

标签: python makefile 32bit-64bit

我试图按照下面的说明操作我的32位Windows,取自here

  1. cd c:\
  2. git clone --recursive https://github.com/dmlc/xgboost
  3. cd xgboost
  4. git submodule init
  5. git submodule update
  6. cp make / mingw64.mk config.mk
  7. make -j4
  8. 但是我得到了这样的错误:

    $ 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

1 个答案:

答案 0 :(得分:0)

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

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