windows编译xgboost-python,不用vs编译
2016-12-26 22:52
495 查看
stackoverflow上看到的,是我所看到最方便的方式。
原文:
http://stackoverflow.com/questions/33749735/how-to-install-xgboost-package-in-python-windows-platform
So here's what I did to finish a 64-bit build on Windows:
Download and install MinGW-64: http://sourceforge.net/projects/mingw-w64/
On the first screen of the install prompt make sure you set the Architecture to x86_64 and the Threads to win32
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
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
Open a Windows command prompt and type gcc. You should see something like "fatal error: no input file"
Next type make. You should see something like "No targets specified and no makefile found"
Type git. If you don't have git, install it and add it to your PATH.
These should be all the tools you need to build the xgboost project. To get the source code run these lines:
cd c:\
git clone --recursive https://github.com/dmlc/xgboost
cd xgboost
git submodule init
git submodule update
cp make/mingw64.mk config.mk
make -j4
Note that I ran this part from a Cygwin shell. If you are using the Windows command prompt you should be able to change cp to copy and arrive at the same result. However, if the build fails on you for any reason I would recommend trying again using cygwin.亲测直接用cmd都可以编译生成,用git不行。
If the build finishes successfully, you should have a file called xgboost.exe located in the project root. To install the Python package, do the following:
cd python-package
python setup.py install
原文:
http://stackoverflow.com/questions/33749735/how-to-install-xgboost-package-in-python-windows-platform
So here's what I did to finish a 64-bit build on Windows:
Download and install MinGW-64: http://sourceforge.net/projects/mingw-w64/
On the first screen of the install prompt make sure you set the Architecture to x86_64 and the Threads to win32
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
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
Open a Windows command prompt and type gcc. You should see something like "fatal error: no input file"
Next type make. You should see something like "No targets specified and no makefile found"
Type git. If you don't have git, install it and add it to your PATH.
These should be all the tools you need to build the xgboost project. To get the source code run these lines:
cd c:\
git clone --recursive https://github.com/dmlc/xgboost
cd xgboost
git submodule init
git submodule update
cp make/mingw64.mk config.mk
make -j4
Note that I ran this part from a Cygwin shell. If you are using the Windows command prompt you should be able to change cp to copy and arrive at the same result. However, if the build fails on you for any reason I would recommend trying again using cygwin.亲测直接用cmd都可以编译生成,用git不行。
If the build finishes successfully, you should have a file called xgboost.exe located in the project root. To install the Python package, do the following:
cd python-package
python setup.py install
相关文章推荐
- xgboost python windows编译问题
- xgboost python windows编译问题
- windows 新版xgboost Python包安装教程 win10 64
- Windows+python安装xgboost(fix windowerror-127)
- Windows下安装XGBoost(python基于Anaconda2)
- windows下python安装xgboost
- Windows下(不用cygwin)NDK直接编译编译boost 1.55
- Windows下安装python版的XGBoost教程(基于Anaconda)
- XGBoost-安装(Windows/VS2015)
- 64 位 windows 下 安装 xgboost python版本
- Windows下 VS2015编译boost1.62
- windows下,在python中安装xgboost的简易方法,解决 error C3861: “sleep”: 找不到标识符”
- Windows下安装python版的XGBoost教程(Anaconda)
- windows下xgboost的python配置
- vs2010 编译boost.python
- xgboost学习之windows下python版本安装
- Windows+VS2013下Boost1.59编译运行
- Windows下 VS2015编译boost1.62
- windows下安装xgboost for python 的简单方法
- Python模块常用的几种安装方式 windows下xgboost安装 whl文件安装