簡體   English   中英

如何下載/安裝 xgboost for python (Jupyter notebook)

[英]How to download/install xgboost for python (Jupyter notebook)

當我執行 pip install xgboost 時,出現如下所示的錯誤。 我相信還有另一種使用 git 的方法嗎? 但我不明白如何准確地做到這一點(一步一步) - 我是這個東西的新手。 非常感謝幫助

192-168-1-10:Desktop yadav_sa$ pip install xgboost
    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
        clang-omp++ -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: clang-omp++: command not found
        clang-omp++ -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
        make: *** [build/learner.o] Error 127
        make: *** Waiting for unfinished jobs....
        /bin/sh: clang-omp++: command not found
        make: *** [build/logging.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
        clang-omp++ -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: clang-omp++: command not found
        make: *** [build/learner.o] Error 127
        make: *** Waiting for unfinished jobs....
        clang-omp++ -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
        /bin/sh: clang-omp++: command not found
        make: *** [build/logging.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 "/private/var/folders/t8/y5n13zb97n1576yvs58vqhm4003cyx/T/pip-build-xcknr88x/xgboost/setup.py", line 29, in <module>
            LIB_PATH = libpath['find_lib_path']()
          File "/private/var/folders/t8/y5n13zb97n1576yvs58vqhm4003cyx/T/pip-build-xcknr88x/xgboost/xgboost/libpath.py", line 45, in find_lib_path
            'List of candidates:\n' + ('\n'.join(dll_path)))
        XGBoostLibraryNotFound: Cannot find XGBoost Libarary in the candicate path, did you install compilers and run build.sh in root path?
        List of candidates:
        /private/var/folders/t8/y5n13zb97n1576yvs58vqhm4003cyx/T/pip-build-xcknr88x/xgboost/xgboost/libxgboost.so
        /private/var/folders/t8/y5n13zb97n1576yvs58vqhm4003cyx/T/pip-build-xcknr88x/xgboost/xgboost/../../lib/libxgboost.so
        /private/var/folders/t8/y5n13zb97n1576yvs58vqhm4003cyx/T/pip-build-xcknr88x/xgboost/xgboost/./lib/libxgboost.so

        ----------------------------------------
    Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/t8/y5n13zb97n1576yvs58vqhm4003cyx/T/pip-build-xcknr88x/xgboost/

我需要這個用於 python 機器學習的包。 我在 mac 上。 在此處輸入圖片說明

在這里,我遵循了官方安裝指南,但收到錯誤消息。

192-168-1-10:xgboost yadav_sa$ cd xgboost; cp make/config.mk ./config.mk; make -j4
-bash: cd: xgboost: Not a directory
c++ -std=c++11 -Wall -Wno-unknown-pragmas -Iinclude   -Idmlc-core/include -Irabit/include -O3 -funroll-loops -msse2 -fPIC -fopenmp -o xgboost  build/cli_main.o build/learner.o build/logging.o build/c_api/c_api.o build/c_api/c_api_error.o build/common/common.o build/common/hist_util.o build/data/data.o build/data/simple_csr_source.o build/data/simple_dmatrix.o build/data/sparse_page_dmatrix.o build/data/sparse_page_raw_format.o build/data/sparse_page_source.o build/data/sparse_page_writer.o build/gbm/gblinear.o build/gbm/gbm.o build/gbm/gbtree.o build/metric/elementwise_metric.o build/metric/metric.o build/metric/multiclass_metric.o build/metric/rank_metric.o build/objective/multiclass_obj.o build/objective/objective.o build/objective/rank_obj.o build/objective/regression_obj.o build/tree/tree_model.o build/tree/tree_updater.o build/tree/updater_colmaker.o build/tree/updater_fast_hist.o build/tree/updater_histmaker.o build/tree/updater_prune.o build/tree/updater_refresh.o build/tree/updater_skmaker.o build/tree/updater_sync.o dmlc-core/libdmlc.a rabit/lib/librabit.a  -pthread -lm  -fopenmp 
c++ -std=c++11 -Wall -Wno-unknown-pragmas -Iinclude   -Idmlc-core/include -Irabit/include -O3 -funroll-loops -msse2 -fPIC -fopenmp -shared -o lib/libxgboost.so build/learner.o build/logging.o build/c_api/c_api.o build/c_api/c_api_error.o build/common/common.o build/common/hist_util.o build/data/data.o build/data/simple_csr_source.o build/data/simple_dmatrix.o build/data/sparse_page_dmatrix.o build/data/sparse_page_raw_format.o build/data/sparse_page_source.o build/data/sparse_page_writer.o build/gbm/gblinear.o build/gbm/gbm.o build/gbm/gbtree.o build/metric/elementwise_metric.o build/metric/metric.o build/metric/multiclass_metric.o build/metric/rank_metric.o build/objective/multiclass_obj.o build/objective/objective.o build/objective/rank_obj.o build/objective/regression_obj.o build/tree/tree_model.o build/tree/tree_updater.o build/tree/updater_colmaker.o build/tree/updater_fast_hist.o build/tree/updater_histmaker.o build/tree/updater_prune.o build/tree/updater_refresh.o build/tree/updater_skmaker.o build/tree/updater_sync.o dmlc-core/libdmlc.a rabit/lib/librabit.a -pthread -lm  -fopenmp 
ar crv lib/libxgboost.a 
ar: no archive members specified
usage:  ar -d [-TLsv] archive file ...
    ar -m [-TLsv] archive file ...
    ar -m [-abiTLsv] position archive file ...
    ar -p [-TLsv] archive [file ...]
    ar -q [-cTLsv] archive file ...
    ar -r [-cuTLsv] archive file ...
    ar -r [-abciuTLsv] position archive file ...
    ar -t [-TLsv] archive [file ...]
    ar -x [-ouTLsv] archive [file ...]
make: *** [lib/libxgboost.a] Error 1
make: *** Waiting for unfinished jobs....
clangclang: : error: error: unsupported option '-fopenmp'unsupported option '-fopenmp'

make: *** [lib/libxgboost.so] Error 1
make: *** [xgboost] Error 1

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM