linux环境下安装xgboost记录(使用Python)

参考官网安装教程:
https://xgboost.readthedocs.io/en/latest/build.html

1 下载whl文件,下载地址为https://s3-us-west-2.amazonaws.com/xgboost-nightly-builds/list.html
下载命令:
wget https://files.pythonhosted.org/packages/7c/32/a11befbb003e0e6b7e062a77f010dfcec0ec3589be537b02d2eb2ff93b9a/xgboost-1.1.1-py3-none-manylinux2010_x86_64.whl

2 安装
pip install xgboost-1.1.1-py3-none-manylinux2010_x86_64.whl

报错:**.whl is not a supported wheel on this platform.

3 尝试另一种压缩包安装方式
下载命令:
wget https://files.pythonhosted.org/packages/aa/08/779aaa15de09590fad94cf533e3cc94b967d71b0daddaa2180685712be28/xgboost-1.1.1.tar.gz
解压命令:
tar -zxvf xgboost-1.1.1.tar.gz
安装命令:
pip install setup.py

出现报错:
ERROR: Could not find a version that satisfies the requirement setup.py (from versions: none)
ERROR: No matching distribution found for setup.py

4 最后重新尝试whl安装的命令
pip install xgboost-1.1.1-py3-none-manylinux2010_x86_64.whl

安装成功! 猜测压缩包安装的时候,虽然最终安装失败了,中间可能帮安装了一些必要的依赖环境

最后一点:因为我的Python环境是3.5.2,所以安装的较老的xgboost。如果是Python3.6以上,可以下载安装较新的whl

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值