Ubuntu安装xgboost
2016-08-07 11:04
295 查看
实验室集群上需要安装xgboost,先把它连同submodule一起clone下来
git clone --recursive https://github.com/dmlc/xgboost然后 cd xgboost,执行make,若想加快编译速度,对于多核CPU,可以make -j4,
编译后会在xgboost/lib目录生成libxgboost.a和.so文件
随后是安装python的模块,主要看这么两种方式:
cd python-package; sudo python setup.py install这种方式是将python模块加载到系统路径上
另外一种方式是
export PYTHONPATH=~/xgboost/python-package这样是将当前python包的路径加到PYTHONPATH中,系统以后能找到
对于开发者,推荐第二种方式,因为第一种方式当你改变了代码后,又得install一遍。这里我们也用的export的方式
然后python -c "import xgboost as xgb"提示说缺少scipy的模块,说明当前系统还没安装scipy
下面是安装scipy:
git clone git://github.com/scipy/scipy.git scipy
cd scipy, 执行
提示说
看网上的文档说,scipy依赖lapack, nose, atlas等包,安装一套流程下来确实比较繁琐,我不确定自己的集群上是否已经安装好了可以被scipy用的atlas,正在观望时,到scipy的官网上看了一下介绍,对于ubuntu&debian系统,可以用安装好一套scipy stack:
sudo apt-get install python-numpy python-scipy python-matplotlib ipython ipython-notebook python-pandas python-sympy python-nose安装完成后,确实能用了。
这里看貌似也并没有安装atlas和lapack,不知道是不是系统自带了的缘故,并且apt-get install的方式不会出现安装numpy时找不到gfortran的错误,可以说是“一键”解决,这里mark下。
git clone --recursive https://github.com/dmlc/xgboost然后 cd xgboost,执行make,若想加快编译速度,对于多核CPU,可以make -j4,
编译后会在xgboost/lib目录生成libxgboost.a和.so文件
随后是安装python的模块,主要看这么两种方式:
cd python-package; sudo python setup.py install这种方式是将python模块加载到系统路径上
另外一种方式是
export PYTHONPATH=~/xgboost/python-package这样是将当前python包的路径加到PYTHONPATH中,系统以后能找到
对于开发者,推荐第二种方式,因为第一种方式当你改变了代码后,又得install一遍。这里我们也用的export的方式
然后python -c "import xgboost as xgb"提示说缺少scipy的模块,说明当前系统还没安装scipy
下面是安装scipy:
git clone git://github.com/scipy/scipy.git scipy
cd scipy, 执行
python setup.py install
提示说
ImportError: No module named Cython.Compiler.Main Exception: Cython either isn't installed or it failed. Traceback (most recent call last): File "setup.py", line 415, in <module> setup_package() File "setup.py", line 399, in setup_package generate_cython() File "setup.py", line 205, in generate_cython raise RuntimeError("Running cythonize failed!") RuntimeError: Running cythonize failed!即 要先安装Cpython
看网上的文档说,scipy依赖lapack, nose, atlas等包,安装一套流程下来确实比较繁琐,我不确定自己的集群上是否已经安装好了可以被scipy用的atlas,正在观望时,到scipy的官网上看了一下介绍,对于ubuntu&debian系统,可以用安装好一套scipy stack:
sudo apt-get install python-numpy python-scipy python-matplotlib ipython ipython-notebook python-pandas python-sympy python-nose安装完成后,确实能用了。
这里看貌似也并没有安装atlas和lapack,不知道是不是系统自带了的缘故,并且apt-get install的方式不会出现安装numpy时找不到gfortran的错误,可以说是“一键”解决,这里mark下。
相关文章推荐
- ubuntu 安装xgboost
- Ubuntu16.04安装XGBoost简明教程
- ubuntu16.04 64位 cpu安装tensorflow+theano+keras+caffe+xgboost
- Ubuntu 16.04安装CUDA9+Docker CE+NVIDIA-Docker+TensorFlow/XGBoost
- centos7 和ubuntu17.10 安装xgboost
- Ubuntu16.04 安装xgboost(anaconda3)
- Linux使用经验:Ubuntu 安装xgboost和lightgbm(anaconda3)
- Ubuntu14.04安装scipy,xgboost,dateutil模块到python3
- Ubuntu 下安装xgboost
- ubuntu16.04(liunx) 离线安装 xgboost (anaconda3,anaconda2共存)
- xgboost在ubuntu系统下的安装使用
- ubuntu安装xgboost,C 96f5 PU版和GPU版配置
- Ubuntu安装xgboost
- Ubuntu16.04 安装xgboost(anaconda3)
- Ubuntu16.04安装xgboost
- 在Ubuntu下安装xgboost
- ubuntu16.04下安装xgboost
- Ubuntu 16.04安装CUDA9+Docker CE+NVIDIA-Docker+TensorFlow/XGBoost
- ubuntu安装xgboost
- ubuntu 安装boost