Reputation: 301
I'm struglling yo install xgboost on anaconda 3, on windows 10 64 bits. I followed the instruction of the tutorials at https://www.ibm.com/developerworks/community/blogs/jfp/entry/Installing_XGBoost_For_Anaconda_on_Windows?lang=en and https://dnc1994.com/2016/03/installing-xgboost-on-windows/ but I failded to complet the compilation process.
I executed the following code (git bash) and everything seems to be ok at this stage:
$ git clone --recursive https://github.com/dmlc/xgboost
$ cd xgboost
$ git submodule init
$ git submodule update
Then,I installed the mingw and added to the path:
C:\Program Files\mingw-w64\x86_64-6.3.0-posix-seh-rt_v5-rev2\mingw64\bin
The following instruction executed and returned no error:
$ which mingw32-make
$ alias make='mingw32-make'
Next I tried to execute the folling commands (also git bash) and I got an error in the 2nd step (make -j4):
$ cd dmlc-core
$ make -j4
$ cd ../rabit
$ make lib/librabit_empty.a -j4
$ cd ..
$ cp make/mingw64.mk config.mk
$ make -j4
I got ehe folloing error:
$ make -j4
g++ -c -O3 -Wall -Wno-unknown-pragmas -Iinclude -std=c++0x -fPIC -DDMLC_USE_HDFS=0 -DDMLC_USE_S3=0 -DDMLC_USE_AZURE=0 -msse2 -o line_split.o src/io/line_split.cc
g++ -c -O3 -Wall -Wno-unknown-pragmas -Iinclude -std=c++0x -fPIC -DDMLC_USE_HDFS=0 -DDMLC_USE_S3=0 -DDMLC_USE_AZURE=0 -msse2 -o recordio_split.o src/io/recordio_split.cc
g++ -c -O3 -Wall -Wno-unknown-pragmas -Iinclude -std=c++0x -fPIC -DDMLC_USE_HDFS=0 -DDMLC_USE_S3=0 -DDMLC_USE_AZURE=0 -msse2 -o input_split_base.o src/io/input_split_base.cc
g++ -c -O3 -Wall -Wno-unknown-pragmas -Iinclude -std=c++0x -fPIC -DDMLC_USE_HDFS=0 -DDMLC_USE_S3=0 -DDMLC_USE_AZURE=0 -msse2 -o io.o src/io.cc
src/io/recordio_split.cc:1:0: warning: -fPIC ignored for target (all code is position independent) [enabled by default]
src/io/input_split_base.cc:1:0: warning: -fPIC ignored for target (all code is position independent) [enabled by default]
src/io.cc:1:0: warning: -fPIC ignored for target (all code is position independent) [enabled by default]
src/io/line_split.cc:1:0: warning: -fPIC ignored for target (all code is position independent) [enabled by default]
src/io/input_split_base.cc: In member function 'void dmlc::io::InputSplitBase::InitInputFileInfo(const string&)':
src/io/input_split_base.cc:112:12: warning: variable 'exact_match' set but not used [-Wunused-but-set-variable]
In file included from c:\rtools\gcc-4.6.3\bin\../lib/gcc/i686-w64-mingw32/4.6.3/../../../../include/c++/4.6.3/cstdio:44:0,
from include/dmlc/io.h:8,
from src/io.cc:4:
c:\rtools\gcc-4.6.3\bin\../lib/gcc/i686-w64-mingw32/4.6.3/../../../../i686-w64-mingw32/include/stdio.h:396:83: error: 'FILE* std::fopen(const char*, const char*)' should have been declared inside 'std'
c:\rtools\gcc-4.6.3\bin\../lib/gcc/i686-w64-mingw32/4.6.3/../../../../i686-w64-mingw32/include/stdio.h:396:83: error: declaration of 'FILE* std::fopen(const char*, const char*)'
c:\rtools\gcc-4.6.3\bin\../lib/gcc/i686-w64-mingw32/4.6.3/../../../../i686-w64-mingw32/include/stdio.h:395:17: error: conflicts with previous declaration 'FILE* fopen(const char*, const char*)'
In file included from include/dmlc/./././parameter.h:25:0,
from include/dmlc/././registry.h:14,
from include/dmlc/./data.h:16,
from include/dmlc/threadediter.h:20,
from src/io/cached_input_split.h:16,
from src/io.cc:13:
include/dmlc/././././optional.h:31:27: error: both 'const' and 'constexpr' cannot be used here
In file included from include/dmlc/././registry.h:14:0,
from include/dmlc/./data.h:16,
from include/dmlc/threadediter.h:20,
from src/io/cached_input_split.h:16,
from src/io.cc:13:
include/dmlc/./././parameter.h: In member function 'virtual void dmlc::parameter::FieldEntry<float>::Set(void*, const string&) const':
include/dmlc/./././parameter.h:962:25: error: 'stof' is not a member of 'std'
include/dmlc/./././parameter.h: In member function 'virtual void dmlc::parameter::FieldEntry<double>::Set(void*, const string&) const':
include/dmlc/./././parameter.h:983:25: error: 'stod' is not a member of 'std'
In file included from src/io/cached_input_split.h:16:0,
from src/io.cc:13:
include/dmlc/threadediter.h: At global scope:
include/dmlc/threadediter.h:210:3: error: 'thread' in namespace 'std' does not name a type
include/dmlc/threadediter.h:216:3: error: 'mutex' in namespace 'std' does not name a type
include/dmlc/threadediter.h:222:3: error: 'condition_variable' in namespace 'std' does not name a type
include/dmlc/threadediter.h:224:3: error: 'condition_variable' in namespace 'std' does not name a type
include/dmlc/threadediter.h: In constructor 'dmlc::ThreadedIter<DType>::ThreadedIter(size_t)':
include/dmlc/threadediter.h:82:9: error: class 'dmlc::ThreadedIter<DType>' does not have any field named 'producer_thread_'
include/dmlc/threadediter.h: In member function 'virtual void dmlc::ThreadedIter<DType>::BeforeFirst()':
include/dmlc/threadediter.h:168:5: error: 'unique_lock' is not a member of 'std'
include/dmlc/threadediter.h:168:22: error: 'mutex' is not a member of 'std'
include/dmlc/threadediter.h:168:39: error: 'mutex_' was not declared in this scope
..... dmlc::ThreadedIter::Next() [with DType = dmlc::data::RowBlockContainer]' src/data.cc:160:1: instantiated from here include/dmlc/threadediter.h:387:5: error: 'lock' was not declared in this scope include/dmlc/threadediter.h: In member function 'bool dmlc::ThreadedIter::Next(DType**) [with DType = dmlc::data::RowBlockContainer]': include/dmlc/threadediter.h:151:5: instantiated from 'bool dmlc::ThreadedIter::Next() [with DType = dmlc::data::RowBlockContainer]' src/data.cc:160:1: instantiated from here include/dmlc/threadediter.h:362:3: error: 'lock' was not declared in this scope include/dmlc/threadediter.h: In member function 'void dmlc::ThreadedIter::Recycle(DType**) [with DType = dmlc::data::RowBlockContainer]': include/dmlc/threadediter.h:149:7: instantiated from 'bool dmlc::ThreadedIter::Next() [with DType = dmlc::data::RowBlockContainer]' src/data.cc:160:1: instantiated from here include/dmlc/threadediter.h:387:5: error: 'lock' was not declared in this scope include/dmlc/threadediter.h: In member function 'bool dmlc::ThreadedIter::Next(DType**) [with DType = dmlc::data::RowBlockContainer]': include/dmlc/threadediter.h:151:5: instantiated from 'bool dmlc::ThreadedIter::Next() [with DType = dmlc::data::RowBlockContainer]' src/data.cc:160:1: instantiated from here include/dmlc/threadediter.h:362:3: error: 'lock' was not declared in this scope Makefile:83: recipe for target 'data.o' failed mingw32-make: *** [data.o] Error 1
I googled a lot and it seems like installing an up to date verdion of python xgboost on anacoda 3 windows 64 is really hard. Does anyone have a hint on how to deal with this ?
Upvotes: 2
Views: 4505
Reputation: 53
As of about a month ago, win64 builds of xgboost are available via Conda. conda install py-xgboost
should work.
Upvotes: 4