centos下安装xgboost

前端之家收集整理的这篇文章主要介绍了centos下安装xgboost前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我们需要pip来安装xgboost

wget--no-check-certificatehttps://github.com/pypa/pip/archive/1.5.5. tar.gz
tarzxvf1.5.5.tar.gz #解压文件
cdpip-1.5.5/
pythonsetup.pyinstall
这个时候有可能会报如下错误

# python setup.py install
Traceback (most recent call last):
File "setup.py",line 6,in <module>
from setuptools import setup,find_packages
ImportError: No module named setuptools
这时候需要安装setuptools

wget http://pypi.python.org/packages/source/s/setuptools/setuptools-0.6c11.tar.gz
tar zxvf setuptools-0.6c11.tar.gz
cd setuptools-0.6c11

python setup.py build
python setup.py install
执行完这步骤,再回到pip目录下执行安装命令即可。

cdpip-1.5.5/
pythonsetup.pyinstall
一切正常

pipinstallxgboost
显示出安装目录:
Requirement already satisfied (use --upgrade to upgrade): xgboost in /usr/local/python27/lib/python2.7/site-packages
Requirement already satisfied (use --upgrade to upgrade): numpy in /usr/local/python27/lib/python2.7/site-packages (from xgboost)
Requirement already satisfied (use --upgrade to upgrade): scipy in /usr/local/python27/lib/python2.7/site-packages (from xgboost)

或者更简单一些
python get-pip.py
pip install xgboost
原文链接:https://www.f2er.com/centos/381718.html

猜你在找的CentOS相关文章