If you don’t have git, install it and add it to your PATH. You should see something like “No targets specified and no makefile found” You should see something like “fatal error: no input file”
#Conda install xgboost 0.72.1 windows#
Open a Windows command prompt and type gcc. I also noticed that the make utility that is included in bin\mingw64 is called mingw32-make so to simplify things I just renamed this to make I installed to C:\mingw64 (to avoid spaces in the file path) so I added this to my PATH environment variable: C:\ mingw64 \ mingw64 \ bin(Please remove spaces) On the first screen of the install prompt make sure you set the Architecture to x86_64 and the Threads to win32 So here’s what I did to finish a 64-bit build on Windows:ĭownload and install MinGW-64: /projects/mingw-w64/ Param = Įvallist = īst = xgb.train( param, dtrain, num_round, evallist ) Label = np.random.randint(2, size=5) # binary target import xgboost as xgbĭata = np.random.rand(5,10) # 5 entities, each contains 10 features We can then import xgboost and run a small example. Os.environ = mingw_path + ' ' + os.environ In order to avoid it we mustĪdd the path to the g++ runtime libraries to the os environment path C:\Users\IBM_ADMIN\code\xgboost\python-package>python setup.py install The point is to move to the python-package directory of XGBoost. For Anaconda, I will simply use the Anaconda prompt,Īnd type the following in it (after the prompt, in my case Ĭ:\Users\IBM_ADMIN>): C:\Users\IBM_ADMIN>cd code\xgboost\python-package
What follows depends on the Python distribution Once the last command completes the build is done. Good luck!Īlso copied below the original contents in case the link is not available… The trick is after installing successfully for regular Python, to have it work for Anaconda, you just need to pull up the Anaconda prompt and cd into this folder “code\xgboost\python-package”, then run: python setup.py installĪnd voila! The article says you need to add the path, but for me it worked directly.
I then searched again and found this great article which made it! I recognized this is due to the fact that Anaconda has a different Python distribution. But when I tried to import using Anaconda, it failed. I was able to install xgboost for Python in Windows yesterday by following this link.