在python下安装xgboost,64位msys失败 [英] Install xgboost under python with 64-bit msys failing
问题描述
我想使用 anaconda python 安装 xgboost.在这个过程中,我正在尝试安装 xgboost.在尝试制作" xgboost 时,我收到以下错误:
I want to install xgboost using anaconda python. In this process, I am trying to install xgboost. While trying to "make" the xgboost i am getting the below error:
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 而不是用于 mingw-w64 的 g++.在 mingw-w64 包下,g++ 和其他应用程序+文件夹仅适用于 mingw32,而不适用于 64.对于 mingw-64,仅存在批处理文件和 Internet 快捷方式.
I understood from the other Stack overflow posts that 32 bit gcc cannot go with the 64bit anaconda that i am using. However when i installed mingw-w64 i could see that it has g++ only for mingw32 and not for mingw-w64. Under the mingw-w64 package, g++ and other applications+folders are present only for mingw32 and not for 64. For mingw-64 only a batch file and a internet short cut is present.
能否请您指导我出了什么问题或指导我到合适的地方,我可以从那里下载 mingw-64.
Could you please guide me what is going wrong or guide me to an appropriate place from where i can download for mingw-64.
提前致谢.
推荐答案
如果你真的在使用 MSYS2,那么你不应该下载单独的编译器.您应该通过运行 pacman -S mingw-w64-x86_64-toolchain
使用 MSYS2 的包管理器安装 64 位 g++.然后确保使用开始菜单中名为MSYS2 Win64 Shell"的快捷方式启动 MSYS2 shell.在 Bash 中输入 which g++
并确保它输出 /mingw64/bin/g++
.然后您应该能够为 64 位 Windows 编译代码.
If you are really using MSYS2, then you should not be downloading separate compilers. You should install 64-bit g++ using MSYS2's package manager, by running pacman -S mingw-w64-x86_64-toolchain
. Then make sure that you start the MSYS2 shell using the shortcut that is named something like "MSYS2 Win64 Shell" in your start menu. Type which g++
in Bash and make sure it outputs /mingw64/bin/g++
. Then you should be able to compile code for 64-bit Windows.
我不确定这个答案是否完整.如果您需要有关 MSYS2 的更多帮助,最好发布您正在运行的确切命令以下载/提取源代码并进行构建,以便其他人可以重现错误.
I'm not sure that this answer is complete. If you need more help with MSYS2, it would be good to post the exact commands you are running to download/extract the source code and build so that others can reproduce the error.
这篇关于在python下安装xgboost,64位msys失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!