【问题标题】:Install xgboost under python with 64-bit msys failing在 python 下安装 xgboost,64 位 msys 失败
【发布时间】:2016-01-31 23:01:01
【问题描述】:

我想使用 anaconda python 安装 xgboost。在这个过程中,我正在尝试安装 xgboost。在尝试“制作” xgboost 时,我收到以下错误:

C:\GitRepository\xgboost>


g++ -m64 -c -Wall -O3 -msse2  -Wno-unknown-pragmas -funroll-loops -fopenmp -fPIC
 -o updater.o src/tree/updater.cpp
src/tree/updater.cpp:1:0: warning: -fPIC ignored for target (all code is positio
n independent)
 // Copyright 2014 by Contributors
 ^
src/tree/updater.cpp:1:0: sorry, unimplemented: 64-bit mode not compiled in
make: *** [updater.o] Error 1

我从其他堆栈溢出帖子中了解到,32 位 gcc 不能与我正在使用的 64 位 anaconda 一起使用。但是,当我安装 mingw-w64 时,我可以看到它只有 mingw32 的 g++ 而不是 mingw-w64。在 mingw-w64 包下,g++ 和其他应用程序+文件夹仅适用于 mingw32,而不适用于 64。对于 mingw-64,仅存在批处理文件和 Internet 快捷方式。

请您指导我出了什么问题或指导我到一个合适的地方,我可以从那里下载 mingw-64。

提前致谢。

【问题讨论】:

    标签: python-2.7 msysgit msys msys2 xgboost


    【解决方案1】:

    如果您真的在使用MSYS2,那么您不应该下载单独的编译器。您应该使用 MSYS2 的包管理器,通过运行pacman -S mingw-w64-x86_64-toolchain 来安装 64 位 g++。然后确保使用开始菜单中名为“MSYS2 Win64 Shell”的快捷方式启动 MSYS2 shell。在 Bash 中输入 which g++ 并确保它输出 /mingw64/bin/g++。那么你应该可以为 64 位 Windows 编译代码了。

    我不确定这个答案是否完整。如果您需要有关 MSYS2 的更多帮助,最好发布您正在运行的确切命令以下载/提取源代码并进行构建,以便其他人可以重现错误。

    【讨论】:

    • 谢谢。我会按照建议尝试并回复您。
    猜你喜欢
    • 2015-11-22
    • 1970-01-01
    • 1970-01-01
    • 2019-01-05
    • 1970-01-01
    • 2012-11-15
    • 2019-07-30
    • 2011-12-03
    • 1970-01-01
    相关资源
    最近更新 更多