+3 votes
in General IT Tips by (350k points)
I want to install xgboost library for python on Windows machine. I found several answers on internet, but none seems to be working because of missing files like execinfo.h or libxgboost.dll .

It seems that the install is not easy as libxgboost.dll needs to be built. I tried pip and conda to install, but nothing worked. Can someone please help?

1 Answer

+2 votes
by (56.8k points)
selected by
 
Best answer

I also faced issue with the creation of libxgboost.dll as some files are missing in github repository. Somehow I found libxgboost.dll on some website and it worked.

The steps to install xgboost for python on Windows are as follows:

  1. If you have git installed on your machine, open Windows terminal (cmd) and change the folder where you want to install xgboost.
  2. Type command :  git clone --recursive https://github.com/dmlc/xgboost . It will clone the git repository by creating a folder xgboost in the current directory.
  3. Once cloning is done, change the directory from the current directory: cd xgboost\python-package
  4. Download the dll file from this link: http://ssl.picnet.com.au/xgboost/20170504/x64/libxgboost.dll 
  5. Move this dll file to this folder: xgboost\python-package\xgboost
  6. After moving the dll file, run python setup.py install from command line to install xgboost e.g. C:\Users\unmi\xgboost\python-package>python setup.py install

The above 6 steps should install xgboost successfully. It worked for me. If it doesn't work, reply to this post.


...