Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/linux/23.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 在EC2上安装XGBoost_Python_Linux_Amazon Web Services_Amazon Ec2_Xgboost - Fatal编程技术网

Python 在EC2上安装XGBoost

Python 在EC2上安装XGBoost,python,linux,amazon-web-services,amazon-ec2,xgboost,Python,Linux,Amazon Web Services,Amazon Ec2,Xgboost,我正在尝试在EC2实例上安装XGBoost,并在尝试“pip安装XGBoost”后不断出现以下错误: >收集xgboost 使用缓存的xgboost-0.6a2.tar.gz 从命令python setup.py egg_info完成输出: rm-f-rf构建插件库库*~*/*~*/*/*~*/*/*/*/*~*/*.o*/*/*/*.o*/*/*/*/*/*.o xgboost g++-std=c++0x-Wall-O3-msse2-Wno未知pragmas-funroll循环-Iinclud

我正在尝试在EC2实例上安装XGBoost,并在尝试“pip安装XGBoost”后不断出现以下错误:

>收集xgboost
使用缓存的xgboost-0.6a2.tar.gz
从命令python setup.py egg_info完成输出:
rm-f-rf构建插件库库*~*/*~*/*/*~*/*/*/*/*~*/*.o*/*/*/*.o*/*/*/*/*/*.o xgboost
g++-std=c++0x-Wall-O3-msse2-Wno未知pragmas-funroll循环-Iinclude-Idmlc core/include-Irabit/include-fPIC-fopenmp-MM-MT build/logging.o src/logging.cc>build/logging.d
g++-std=c++0x-Wall-O3-msse2-Wno未知pragmas-funroll循环-Iinclude-Idmlc core/include-Irabit/include-fPIC-fopenmp-MM-MT build/learner.o src/learner.cc>build/learner.d
/bin/sh:g++:未找到命令
make:**[build/logging.o]错误127
制作:**等待未完成的工作。。。。
g++-std=c++0x-Wall-O3-msse2-Wno未知pragmas-funroll循环-Iinclude-Idmlc core/include-Irabit/include-fPIC-fopenmp-MM-MT build/common/common.o src/common/common.cc>build/common/common.d
/bin/sh:g++:未找到命令
make:**[build/learner.o]错误127
/bin/sh:g++:未找到命令
make:**[build/common/common.o]错误127
-----------------------------
构建多线程xgboost失败
开始构建单线程xgboost
rm-f-rf构建插件库库*~*/*~*/*/*~*/*/*/*/*~*/*.o*/*/*/*.o*/*/*/*/*/*.o xgboost
g++-std=c++0x-Wall-O3-msse2-Wno未知pragmas-funroll循环-Iinclude-Idmlc core/include-Irabit/include-fPIC-fopenmp-MM-MT build/logging.o src/logging.cc>build/logging.d
g++-std=c++0x-Wall-O3-msse2-Wno未知pragmas-funroll循环-Iinclude-Idmlc core/include-Irabit/include-fPIC-fopenmp-MM-MT build/learner.o src/learner.cc>build/learner.d
/bin/sh:g++:未找到命令
make:**[build/logging.o]错误127
制作:**等待未完成的工作。。。。
g++-std=c++0x-Wall-O3-msse2-Wno未知pragmas-funroll循环-Iinclude-Idmlc core/include-Irabit/include-fPIC-fopenmp-MM-MT build/common/common.o src/common/common.cc>build/common/common.d
/bin/sh:g++:未找到命令
make:**[build/learner.o]错误127
/bin/sh:g++:未找到命令
make:**[build/common/common.o]错误127
成功构建单线程xgboost
如果你想要多线程版本
请参阅doc/build.md中的其他说明
回溯(最近一次呼叫最后一次):
文件“”,第1行,在
文件“/tmp/pip-build-TkrTN6/xgboost/setup.py”,第29行,在
LIB_PATH=libpath['find_LIB_PATH']()
文件“/tmp/pip-build-TkrTN6/xgboost/xgboost/libpath.py”,第45行,在find_lib_path中
'候选列表:\n'+('\n'.join(dll\u路径)))
__builtin_uu2;.XGBoostLibraryNotFound:在candicate路径中找不到XGBoost库,是否安装了编译器并在根路径中运行build.sh?
候选人名单:
/tmp/pip-build-TkrTN6/xgboost/xgboost/libxgboost.so
/tmp/pip-build-TkrTN6/xgboost/xgboost/./../lib/libxgboost.so
/tmp/pip-build-TkrTN6/xgboost/xgboost//lib/libxgboost.so
----------------------------------------
命令“python setup.py egg_info”失败,错误代码为1,位于/tmp/pip-build-TkrTN6/xgboost中/
我正在使用最新版本的Anaconda(Linux)。我尝试过使用miniconda并安装所有需要的软件包,但没有成功。此外,我还尝试了我发现的所有建议


非常感谢任何建议/解决方案。

您缺少
g++
编译器

您没有提到您正在运行的Linux

亚马逊Linux:

yum安装make-glibc-devel-gcc修补程序


您缺少
g++
编译器

您没有提到您正在运行的Linux

亚马逊Linux:

yum安装make-glibc-devel-gcc修补程序


谢谢你的建议,我试过了,说我需要成为root用户。我现在正在解决这个问题。再次感谢您尝试帮助我,但我尝试将sudo添加到命令的前面,并出现了相同的错误。然后我运行“sudosu”并再次尝试安装,同样的错误。linux版本为“Amazon linux AMI 2017.09.1(HVM),SSD卷类型”。列表中的第一个。如果键入“sudo-yum-install-make-glibc-devel-gcc-patch”,确切的错误是什么?键入“sudo-su”而不是“sudo-su”,以使用root权限打开shell。sh-4.2#sudo-yum安装make glibc-devel-gcc补丁加载插件:优先级,更新motd,升级帮助程序包1:make-3.82-21.10.amzn1.x86_64已安装,最新版本包glibc-devel-2.17-196.172.amzn1.x86_64已安装,最新版本包gcc-4.8.5-1.22.amzn1.noarch已安装,最新版本包patch-2.7.1-8.9.amzn1.x86_64已安装,最新版本无事可做sh-4.2#尝试“sudo-yum-install gcc-c++”或“sudo-yum-groupinstall”开发工具”“谢谢你的建议,我尝试过它,说我需要成为root用户。我现在正在解决这个问题。再次感谢你尝试帮助我,但我尝试将sudo添加到命令的前面,并出现了相同的错误。然后我运行了“sudo-su”“然后再次尝试安装,出现相同的错误。”。linux版本为“Amazon linux AMI 2017.09.1(HVM),SSD卷类型”。列表中的第一个。如果键入“sudo-yum-install-make-glibc-devel-gcc-patch”,确切的错误是什么?键入“sudo-su”而不是“sudo-su”,以使用root权限打开shell。sh-4.2#sudo-yum安装make glibc-devel-gcc补丁加载插件:优先级,更新motd,升级帮助程序包1:make-3.82-21.10.amzn1.x86_64已安装,最新版本包glibc-devel-2.17-196.172.amzn1.x86_64已安装,最新版本包gcc-4.8.5-1.22.amzn1.noarch已安装,最新版本包patch-2.7.1-8.9.amzn1.x86_64已安装,最新版本无事可做sh-4.2#尝试“sudo yum insta
> Collecting xgboost
  Using cached xgboost-0.6a2.tar.gz
    Complete output from command python setup.py egg_info:
    rm -f -rf build build_plugin lib bin *~ */*~ */*/*~ */*/*/*~ */*.o */*/*.o */*/*/*.o xgboost
    g++ -std=c++0x -Wall -O3 -msse2  -Wno-unknown-pragmas -funroll-loops -Iinclude   -Idmlc-core/include -Irabit/include -fPIC -fopenmp -MM -MT build/logging.o src/logging.cc >build/logging.d
    g++ -std=c++0x -Wall -O3 -msse2  -Wno-unknown-pragmas -funroll-loops -Iinclude   -Idmlc-core/include -Irabit/include -fPIC -fopenmp -MM -MT build/learner.o src/learner.cc >build/learner.d
    /bin/sh: g++: command not found
    make: *** [build/logging.o] Error 127
    make: *** Waiting for unfinished jobs....
    g++ -std=c++0x -Wall -O3 -msse2  -Wno-unknown-pragmas -funroll-loops -Iinclude   -Idmlc-core/include -Irabit/include -fPIC -fopenmp -MM -MT build/common/common.o src/common/common.cc >build/common/common.d
    /bin/sh: g++: command not found
    make: *** [build/learner.o] Error 127
    /bin/sh: g++: command not found
    make: *** [build/common/common.o] Error 127
    -----------------------------
    Building multi-thread xgboost failed
    Start to build single-thread xgboost
    rm -f -rf build build_plugin lib bin *~ */*~ */*/*~ */*/*/*~ */*.o */*/*.o */*/*/*.o xgboost
    g++ -std=c++0x -Wall -O3 -msse2  -Wno-unknown-pragmas -funroll-loops -Iinclude   -Idmlc-core/include -Irabit/include -fPIC -fopenmp -MM -MT build/logging.o src/logging.cc >build/logging.d
    g++ -std=c++0x -Wall -O3 -msse2  -Wno-unknown-pragmas -funroll-loops -Iinclude   -Idmlc-core/include -Irabit/include -fPIC -fopenmp -MM -MT build/learner.o src/learner.cc >build/learner.d
    /bin/sh: g++: command not found
    make: *** [build/logging.o] Error 127
    make: *** Waiting for unfinished jobs....
    g++ -std=c++0x -Wall -O3 -msse2  -Wno-unknown-pragmas -funroll-loops -Iinclude   -Idmlc-core/include -Irabit/include -fPIC -fopenmp -MM -MT build/common/common.o src/common/common.cc >build/common/common.d
    /bin/sh: g++: command not found
    make: *** [build/learner.o] Error 127
    /bin/sh: g++: command not found
    make: *** [build/common/common.o] Error 127
    Successfully build single-thread xgboost
    If you want multi-threaded version
    See additional instructions in doc/build.md
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-TkrTN6/xgboost/setup.py", line 29, in <module>
        LIB_PATH = libpath['find_lib_path']()
      File "/tmp/pip-build-TkrTN6/xgboost/xgboost/libpath.py", line 45, in find_lib_path
        'List of candidates:\n' + ('\n'.join(dll_path)))
    __builtin__.XGBoostLibraryNotFound: Cannot find XGBoost Libarary in the candicate path, did you install compilers and run build.sh in root path?
    List of candidates:
    /tmp/pip-build-TkrTN6/xgboost/xgboost/libxgboost.so
    /tmp/pip-build-TkrTN6/xgboost/xgboost/../../lib/libxgboost.so
    /tmp/pip-build-TkrTN6/xgboost/xgboost/./lib/libxgboost.so

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-TkrTN6/xgboost/