I have installed XGBoost library using pip which is accessible in the python command prompt as shown below:
(base) abhishek@abhishek:~$ pip3 install xgboost C