ImportError: No module named xgboost

First you need to get control of your python environment. Download the homebrew python by pasting these into a fresh terminal window

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

here you will be prompterd to enter your password. After homebrew is installed, install python with brew install python. Please check your installation with brew doctor and follow homebrew’s suggestions.

Now, with a fresh terminal window, install xgboost from pip. Open terminal and paste this in:

pip install xgboost

Leave a Comment