Python之xgboost新版0.6win7安装笔记

Python安装xgboost
1安装anaconda
2安装mingw-w64
下载x86_64-5.3.0-release-win32-seh-rt_v4-rev0.7z
https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/5.3.0/threads-win32/seh/
https://sourceforge.net/projects/mingw-w64/
解压到某一目录下
配置环境变量-将C:/mingw64/bin;粘贴到path环境变量下,用“;”隔开。
C:\mingw64\bin;
由于目录 bin\mingw64 下 mingw32-make.exe 名字太长,因此将其重命名为make.exe
3安装git
4安装xgboost在git bash里执行
cd c:\
git clone --recursive https://github.com/dmlc/xgboost
cd xgboost
git submodule init
git submodule update
cp make/mingw64.mk config.mk
make -j4  
如果编译成功,在xgboost根目录下会出现xgboost.exe
cd python-package  (位于xgboost目录下)
python setup.py install  (在此之前先安装numpy+mkl和scipy)
在python的IDE下执行
我们必须添加path的G + +运行时库的操作系统环境变量和路径
import os
mingw_path = 'C:\\mingw64\\bin'
os.environ['PATH'] = mingw_path + ';' + os.environ['PATH']

import xgboost

不报错就是安装成功

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值