Open In App

How to Install xgboost in Anaconda Python?

Improve
Improve
Like Article
Like
Save
Share
Report

Xgboost is a supervised learning library that is used for classification as well as regeneration. It implements ML algorithms under the Gradient Boosting framework, and it provides a parallel tree boosting (also known as GBDT, GBM) which solves many data science problems in a fast and accurate way. It can run on both single and distributed frameworks like Apache Hadoop, Apache Spark, etc. In this article, we are going to see how to install Xgboost in Anaconda Python.

Installing xgboost in Anaconda 

Step 1: Install the current version of Python3 in Anaconda.

Step 2: Check pip3 and python3 are correctly installed in the system.

Check-pip3-and-python3

Step 3: To install xgboost library we will run the following commands in conda environment.

conda install -c anaconda py-xgboost

Install-xgboost-library

You can also install this package in specific in R programming:

install.packages(“xgboost”)

Verifying xgboost installation

You can import this module in your Python terminal to verify if the Setuptools installation has been done properly or not:

import xgboost as xgb

print(xgb)

Verifying-xgboost-installation


Last Updated : 14 Feb, 2022
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads