2

I have been driving myself crazy trying to install xgboost in python on windows 10. I have looked through several suggested articles but still can't seem to find a proper solution. If anyone has done this before kindly share your method other suggestions are also welcome.

Thank

sophros
  • 14,672
  • 11
  • 46
  • 75
Uasthana
  • 1,645
  • 5
  • 16
  • 24
  • Did you follow this article specifically? https://github.com/dmlc/xgboost/blob/master/doc/build.md#building-on-windows – HEADLESS_0NE Apr 04 '16 at 20:32
  • I tried following it, downloaded git for windows, tried creating a buildbut it keep throwing error like - fatal: could not create work tree dir 'xgboost': Permission denied The steps are not very clear and I have not used GIT before thats why I am having a hard time doing this.... – Uasthana Apr 05 '16 at 14:16
  • Open MinGW as administrator and try again. That should handle `permission denied` errors. – HEADLESS_0NE Apr 05 '16 at 17:00
  • Hey I am getting this error `cp: cannot stat 'make/mingw64.mk': No such file or directory bash: mingw32-make: command not found` Even after adding this statement in the .bashhrc `alias make='mingw32-make'` – Uasthana Apr 05 '16 at 17:17
  • That just means you're in the wrong directory. In general, when you are using command line environments such as MinGW and even the Windows cmd, you use the `cd` command to move directories (`cd` is an abbreviation for `change directory`). Did you add `alias make='mingw32-make'` to the `.bashrc` file? If you did, do the following: `source ~/.bashrc` What's the output of `pwd` in MinGW? – HEADLESS_0NE Apr 05 '16 at 17:23
  • I can try to help you through it if you want. Join this chat: http://chat.stackoverflow.com/rooms/108311/room-for-headless-0ne-and-uasthana – HEADLESS_0NE Apr 05 '16 at 17:29
  • Yes I added that command in `C:\Program Files\Git\etc\bash.bashrc` file Am I suppose to run `source ~/.bashrc` in bash prompt because it s giving me an error `bash: source~/.bashrc: No such file or directory` You are right to say I am not in the right directory, which directory should I be in to run this command – Uasthana Apr 05 '16 at 17:29
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/108312/discussion-between-headless-0ne-and-uasthana). – HEADLESS_0NE Apr 05 '16 at 17:31

2 Answers2

2

I had exactly the same problem and just got it resolved! So, basically it's because the "openmp" component is not installed since it's not selected as default. Do the following and it'll work for you!

  1. Close Git Bash
  2. Uninstall TDM-GCC
  3. Reinstall TDM-GCC and be sure to select openmp
  4. try again using Git Bash
  5. If still doesn't work, start from beginning the whole process as described in this page

Also refer to this post for more details.

Community
  • 1
  • 1
George Liu
  • 3,601
  • 10
  • 43
  • 69
0

I managed to install xgboost on Win and Python using Visual Studio following these instructions.

Maximilian Kohl
  • 632
  • 1
  • 9
  • 23