Register Now

Login

Lost Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Login

Register Now

It will take less than 1 minute to register for lifetime. Bonus Tip - We don't send OTP to your email id Make Sure to use your own email id for free books and giveaways

Installing xgboost and pandas_profiling in MacOS

IInstalling xgboost and pandas_profiling in MacOS
Why are we writing this article to install a simple library?
It’s because there is a high probability that you will face issues while importing xgboost in your Jupyter notebook on a MacOS. You will come across a lot of tutorial videos, stackoverflow, and what not.
Chances are that you might waste a lot of time in just importing the library let alone working on it
Installing xgboost and pandas_profiling in MacOS

Posting this blog 3:00 in the morning, because we understand the pain and frustration it cause to deal with errors which are not even worth investing time

I will tell you what all things I tried, and then you can try it in your system. If everything goes well then you might thank me in the comment box 😛

The first error which I got was ‘OpenMP runtime is not installed’

Solution – Open a new workbook in Jupyter and run the command ‘brew install libomp
It will take some time to run, once it is installed. Restart the Kernel

This is essential(at least I tried this), but again when I tried to import xgboost there was another error. This time around there was error of some other dependency. Tried multiple things.

Below is the final thing which helped.
Shut your Jupyter notebook. Close Anaconda.
Open the terminal and write ‘conda install -c conda-forge xgboost‘ (No specific path needed to run this command.

Reopen Anaconda, Launch Jupyter and try ‘import xgboost as xgb’
If the force is with you then it will be imported. Else, google, youtube,Stackoverflow !!

This video helped a lot


Bonus tip
Use the below command in your notebook
pip install pandas-profiling

This will install pandas_profiling package.

What is Panda_profiling?
import pandas_profiling
report = pandas_profiling.ProfileReport(train)
report

train is your training dataset. This above command will give you a complete overview of the dataset. There are many more information than the screenshot give below

Bonus tip 2.0 – The command will take at least 8-10 minutes to summarize the data and your laptop might heat up 😛

Installing xgboost and pandas_profiling in MacOS
Installing xgboost and pandas_profiling in MacOS

We have covered 40+ complete Data Science company interviews from the candidates who cracked these interviews.
Data Science Companies interview questions
We also have 30+ e-books on Amazon, Insta Mojo and books which can be delivered directly on your email address
Complete Set of e-books from The Data Monk
Understand some of the very complex topics in Analytics which are asked in most of the interviews
The Data Monk Top Articles
How to become a Data Scientist? Complete study material, free resources and websites to practice
Become a Data Scientist 
Make your profile on our website and practice at least 5-7 questions per day. Be a part of ~2000 Analytics expert

Keep Learning 🙂

The Data Monk





About TheDataMonkGrand Master

I am the Co-Founder of The Data Monk. I have a total of 6+ years of analytics experience 3+ years at Mu Sigma 2 years at OYO 1 year and counting at The Data Monk I am an active trader and a logically sarcastic idiot :)

Follow Me

Leave a reply