windows下安装xgboost教程

问题:直接用pip install xgboost时,存在下图的问题,


解决方案:

1.安装mingw-w64

(安装时,Architecture选择x86_64,其他不变

(安装后,配置环境变量:在Path中添加H:\adasoftware\mingw64\mingw64\bin)

(然后,在mingw64目录下找到mingw32-make.exe 并将更名为make.exe【不然后面使用make -j4时会出现:make:command not find】,这是为了方便后面使用make -j4

(最后,在cmd下输入make会返回“make: *** No targets specified and no makefile found. Stop.”


2.安装git(下载老是出错,可以放上梯子)(默认安装即可)(配置git环境变量:在path中添加H:\adasoftware\Git\bin)


4.添加anaconda的3个环境变量(在path中添加:H:\adasoftware\anacon\Library\bin,H:\adasoftware\anacon\Scripts,H:\adasoftware\anacon)(这里anaconda的路径其实就是python的路径


3.安装pip

4.安装numpy和scipy

5.安装xgboost

  • 点击桌面git bash图标,打开git-bash,使用:git clone --recursive https://github.com/dmlc/xgboost

  • 然后,依次使用下列7个命令:
   cd xgboost    

git submodule init

git submodule update

cp make/mingw64.mk config.mk

make -j4

cd python-package

python setup.py install

  • 安装完毕,重启 jupyter notebook即可。

相关软件下载链接(文字可点击):

1.MinGW-w64 - for 32 and 64 bit Windows

2.git

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值