1. 程式人生 > >centos下安裝xgboost

centos下安裝xgboost

我們需要pip來安裝xgboost wget --no-check-certificate https://github.com/pypa/pip/archive/1.5.5.tar.gz tar zxvf 1.5.5.tar.gz    #解壓檔案 cd pip-1.5.5/ python setup.py install 這個時候有可能會報如下錯誤: # 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目錄下執行安裝命令即可。 cd pip-1.5.5/ python setup.py install 一切正常 pip install xgboost 顯示出安裝目錄: 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