XGBoost with GPU support installation error: can't copy 'xgboost\lib': doesn't exist or not a regular file

前端 未结 1 745
盖世英雄少女心
盖世英雄少女心 2021-01-26 08:49

Similar non-duplicate posts:

  • How to install xgboost package in python (windows platform)?
  • XGBoost installation issues for Python Anaconda Windows 10 (18
相关标签:
1条回答
  • 2021-01-26 09:19

    Edit xgboost/python-package/setup.py and change line 38 to the following (source) :

    include_package_data=False
    

    Now it should install without any problems. To see that it's all working fine, just run the following command, and if it runs without errors it's good to go:

    python -c "import xgboost"
    

    You can run additional tests after installation using the nose package with the following command executed from the root xgboost/ directory:

    nosetests tests/python
    

    To further confirm that it installed with GPU support, you can use the benchmarking scripts that come included with the installation:

    gpu_hist algorithm:

    python tests/benchmark/benchmark_tree.py
    

    Output:

    Train Time: 46.25219774246216 seconds
    

    hist algorithm without GPU:

    python tests/benchmark/benchmark_tree.py --tree_method hist
    

    Output:

    Train Time: 84.04853415489197 seconds
    
    0 讨论(0)
提交回复
热议问题