Win10 python3版本 安装XGBoost

来源:互联网 发布:nginx 注册域名 编辑:程序博客网 时间:2024/06/09 00:15

Win10 python3版本 安装XGBoost

安装步骤:

  • 安装Git for Windows
  • 打开 bash:
    输入:git clone –recursive https://github.com/dmlc/xgboost
    等待clone完成
  • 然后在bash中输入:
    git submodule init
    git submodule update
  • 修改.bashrc文件:该文件在你所安装的Git目录下etc文件夹中:
    即bash.bashrc文件。在该文件末尾添加:
    alias make=’mingw32-make’
  • 将编译好的xgboost.dll文件放在clone下来的xgboost文件夹下的python-package\xgboost’目录中:如C:\Users\Jerry\xgboost\python-package\xgboost(此为我的电脑上的路径,clone的xgboost在C:\Users\Jerry\目录下)
  • 如果您用的是Anaconda3,此时可以打开Anaconda Prompt(类似于cmd):使用cd 命令切换到xgboost\python-package目录下:

Anaconda Prompt

 cd  C:\Users\Jerry\xgboost\python-package python setup.py install

注:C:\Users\Jerry\xgboost\python-package(为本人电脑路径)

稍等片刻,即可安装成功!

原创粉丝点击