How to install the xgboost python package on Centos 7 for Team Studio Python Notebooks?
book
Article ID: KB0072265
calendar_today
Updated On:
Products
Versions
Spotfire Data Science Team Studio
6.5, 6.6
Description
This article gives steps to install the xgboost python package.
Issue/Introduction
This article gives steps to install the xgboost python package.
Environment
Centos 7
Resolution
The xgboost package installation has the following prerequisites: 1. GCC version 5.x or above 2. CMake 3.20.0
1) Steps to upgrade gcc 1. Check gcc version using the following command if it is lower than 5.x executes commands given in 2. >gcc --version 2. Execute following commands to upgrade gcc version: >sudo yum install -y yum-utils centos-release-scl; >sudo yum -y --enablerepo=centos-sclo-rh-testing install devtoolset-7-gcc; >echo "source /opt/rh/devtoolset-7/enable" | sudo tee -a /etc/profile; >source /opt/rh/devtoolset-7/enable; >sudo yum install centos-release-scl >sudo yum install devtoolset-7-gcc* >scl enable devtoolset-7 bash >which gcc >gcc --version
2) Steps to install CMake 3.20.0 1. Navigate to notebook libraries installation directory cd /opt/conda/envs/python3/lib 2. wget https://github.com/Kitware/CMake/releases/download/v3.20.0/cmake-3.20.0.tar.gz 3. tar -zxvf cmake-3.20.0.tar.gz 4. cd cmake-3.20.0 5. ./bootstrap 6. sudo make install 7. Verify CMake version. cmake --version
3) Install xgboost 1. cd /opt/conda/envs/python3/bin 2. ./pip install xgboost