-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error installing xgboost #1267
Comments
I have the same problem!! |
I have the same problem. |
same here! |
same....... Windows is really not a good choice to do ml. |
@ziqilau @tqchen @JasonTianCHD @yanqingmen
Cheers! |
I can confirm that this works for the time being. Thanks a lot! |
Yes, after 2 days of messing around, the fix from Cortajarena worked! Thank you so much!! |
Thanks you!! @Cortajarena |
Thanks @Cortajarena ! |
Thanks @Cortajarena - you saved my day! :-) |
Thanks @Cortajarena! |
However, when I imported xgboost in jupyter nootbook, import os I got error message: OSError Traceback (most recent call last) C:\Users\L\Anaconda3\lib\site-packages\xgboost-0.4-py3.5.egg\xgboost__init__.py in () C:\Users\L\Anaconda3\lib\site-packages\xgboost-0.4-py3.5.egg\xgboost\core.py in () C:\Users\L\Anaconda3\lib\site-packages\xgboost-0.4-py3.5.egg\xgboost\core.py in _load_lib() C:\Users\L\Anaconda3\lib\ctypes__init__.py in LoadLibrary(self, name) C:\Users\L\Anaconda3\lib\ctypes__init__.py in init(self, name, mode, handle, use_errno, use_last_error) OSError: [WinError 1114] A dynamic link library (DLL) initialization routine failed. Anybody had the same problem? How to fix it? |
Thank you @Cortajarena for the tip!
When I switched back to Anaconda Prompt, redirected to python-packages folder and tried:
I received the error that the library could not be found and it provides a list of candidates. |
After doing the steps you named, type:
You will then be inside the python package directory (inside the xgboost folder of the repo you have already cloned).
Be sure to be using the bit bash instead of the windows command prompt! |
@Cortajarena you are an absolute savior. many, many thanks! |
that fixed the issue for me (Win7 64Bit, mingw-w64): ...\dmlc-core\include\dmlc\base.h line 110++ (commit 75d9be5) #if !defined(GNUC) => #if !defined(GNUC) |
The upstream issue was fixed and the reference to dmlc-core was updated #1408 . I would suggest that someone should close this issue, so that people don't keep installing the June 5th version of code. |
I was building the R package on Windows 7. Latest xgboost package from CRAN didn't build. @Far0n 's solution worked for me. |
I get
|
Hey, I'm having an error when trying to use the "make" cmd. I've tried both mingw-64 as well as the TDM-GCC compilers but no luck. Here's the error log:
$ cp make/mingw64.mk config.mk; make -j4
g++ -m64 -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -DDMLC_ENABLE_STD_THREAD=0 -Idmlc-core/include -Irabit/include -fopenmp -MM -MT build/c_api/c_api.o src/c_api/c_api.cc >build/c_api/c_api.d
g++ -m64 -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -DDMLC_ENABLE_STD_THREAD=0 -Idmlc-core/include -Irabit/include -fopenmp -MM -MT build/c_api/c_api_error.o src/c_api/c_api_error.cc >build/c_api/c_api_error.d
g++ -m64 -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -DDMLC_ENABLE_STD_THREAD=0 -Idmlc-core/include -Irabit/include -fopenmp -MM -MT build/data/sparse_page_raw_format.o src/data/sparse_page_raw_format.cc >build/data/sparse_page_raw_format.d
g++ -m64 -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -DDMLC_ENABLE_STD_THREAD=0 -Idmlc-core/include -Irabit/include -fopenmp -MM -MT build/data/simple_dmatrix.o src/data/simple_dmatrix.cc >build/data/simple_dmatrix.d
g++ -m64 -c -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -DDMLC_ENABLE_STD_THREAD=0 -Idmlc-core/include -Irabit/include -fopenmp -c src/c_api/c_api.cc -o build/c_api/c_api.o
g++ -m64 -c -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -DDMLC_ENABLE_STD_THREAD=0 -Idmlc-core/include -Irabit/include -fopenmp -c src/data/sparse_page_raw_format.cc -o build/data/sparse_page_raw_format.o
g++ -m64 -c -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -DDMLC_ENABLE_STD_THREAD=0 -Idmlc-core/include -Irabit/include -fopenmp -c src/c_api/c_api_error.cc -o build/c_api/c_api_error.o
g++ -m64 -c -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -DDMLC_ENABLE_STD_THREAD=0 -Idmlc-core/include -Irabit/include -fopenmp -c src/data/simple_dmatrix.cc -o build/data/simple_dmatrix.o
In file included from C:/TDM-GCC-64/x86_64-w64-mingw32/include/locale.h:12:0,
from C:/TDM-GCC-64/lib/gcc/x86_64-w64-mingw32/5.1.0/include/c++/clocale:42,
from C:/TDM-GCC-64/lib/gcc/x86_64-w64-mingw32/5.1.0/include/c++/x86_64-w64-mingw32/bits/c++locale.h:41,
from C:/TDM-GCC-64/lib/gcc/x86_64-w64-mingw32/5.1.0/include/c++/bits/localefwd.h:40,
from C:/TDM-GCC-64/lib/gcc/x86_64-w64-mingw32/5.1.0/include/c++/string:43,
from dmlc-core/include/dmlc/base.h:154,
from include/xgboost/data.h:10,
from src/data/simple_dmatrix.cc:7:
C:/TDM-GCC-64/x86_64-w64-mingw32/include/stdio.h:450:83: error: 'FILE* std::fopen(const char_, const char_)' should have been declared inside 'std'
FILE fopen64(const char * restrict filename,const char * restrict mode);
^
C:/TDM-GCC-64/x86_64-w64-mingw32/include/stdio.h:450:83: error: 'FILE std::fopen(const char_, const char_)' conflicts with a previous declaration
C:/TDM-GCC-64/x86_64-w64-mingw32/include/stdio.h:449:17: note: previous declaration 'FILE* fopen(const char_, const char_)'
FILE cdecl fopen(const char * __restrict Filename,const char * restrict Mode) MINGW_ATTRIB_DEPRECATED_SEC_WARN;
^
In file included from C:/TDM-GCC-64/x86_64-w64-mingw32/include/locale.h:12:0,
from C:/TDM-GCC-64/lib/gcc/x86_64-w64-mingw32/5.1.0/include/c++/clocale:42,
from C:/TDM-GCC-64/lib/gcc/x86_64-w64-mingw32/5.1.0/include/c++/x86_64-w64-mingw32/bits/c++locale.h:41,
from C:/TDM-GCC-64/lib/gcc/x86_64-w64-mingw32/5.1.0/include/c++/bits/localefwd.h:40,
from C:/TDM-GCC-64/lib/gcc/x86_64-w64-mingw32/5.1.0/include/c++/string:43,
from dmlc-core/include/dmlc/base.h:154,
from include/xgboost/data.h:10,
from src/data/sparse_page_raw_format.cc:6:
C:/TDM-GCC-64/x86_64-w64-mingw32/include/stdio.h:450:83: error: 'FILE std::fopen(const char, const char)' should have been declared inside 'std'
FILE fopen64(const char * restrict filename,const char * restrict mode);
^
C:/TDM-GCC-64/x86_64-w64-mingw32/include/stdio.h:450:83: error: 'FILE std::fopen(const char, const char)' conflicts with a previous declaration
C:/TDM-GCC-64/x86_64-w64-mingw32/include/stdio.h:449:17: note: previous declaration 'FILE* fopen(const char_, const char_)'
FILE cdecl fopen(const char * __restrict Filename,const char * restrict Mode) MINGW_ATTRIB_DEPRECATED_SEC_WARN;
^
In file included from C:/TDM-GCC-64/x86_64-w64-mingw32/include/locale.h:12:0,
from C:/TDM-GCC-64/lib/gcc/x86_64-w64-mingw32/5.1.0/include/c++/clocale:42,
from C:/TDM-GCC-64/lib/gcc/x86_64-w64-mingw32/5.1.0/include/c++/x86_64-w64-mingw32/bits/c++locale.h:41,
from C:/TDM-GCC-64/lib/gcc/x86_64-w64-mingw32/5.1.0/include/c++/bits/localefwd.h:40,
from C:/TDM-GCC-64/lib/gcc/x86_64-w64-mingw32/5.1.0/include/c++/string:43,
from dmlc-core/include/dmlc/base.h:154,
from src/c_api/./c_api_error.h:9,
from src/c_api/c_api_error.cc:6:
C:/TDM-GCC-64/x86_64-w64-mingw32/include/stdio.h:450:83: error: 'FILE std::fopen(const char, const char)' should have been declared inside 'std'
FILE fopen64(const char * restrict filename,const char * restrict mode);
^
C:/TDM-GCC-64/x86_64-w64-mingw32/include/stdio.h:450:83: error: 'FILE std::fopen(const char, const char)' conflicts with a previous declaration
C:/TDM-GCC-64/x86_64-w64-mingw32/include/stdio.h:449:17: note: previous declaration 'FILE* fopen(const char_, const char_)'
FILE cdecl fopen(const char * __restrict Filename,const char * restrict Mode) MINGW_ATTRIB_DEPRECATED_SEC_WARN;
^
In file included from C:/TDM-GCC-64/x86_64-w64-mingw32/include/locale.h:12:0,
from C:/TDM-GCC-64/lib/gcc/x86_64-w64-mingw32/5.1.0/include/c++/clocale:42,
from C:/TDM-GCC-64/lib/gcc/x86_64-w64-mingw32/5.1.0/include/c++/x86_64-w64-mingw32/bits/c++locale.h:41,
from C:/TDM-GCC-64/lib/gcc/x86_64-w64-mingw32/5.1.0/include/c++/bits/localefwd.h:40,
from C:/TDM-GCC-64/lib/gcc/x86_64-w64-mingw32/5.1.0/include/c++/string:43,
from dmlc-core/include/dmlc/base.h:154,
from include/xgboost/data.h:10,
from src/c_api/c_api.cc:3:
C:/TDM-GCC-64/x86_64-w64-mingw32/include/stdio.h:450:83: error: 'FILE std::fopen(const char, const char)' should have been declared inside 'std'
FILE fopen64(const char * restrict filename,const char * restrict mode);
^
C:/TDM-GCC-64/x86_64-w64-mingw32/include/stdio.h:450:83: error: 'FILE std::fopen(const char, const char)' conflicts with a previous declaration
C:/TDM-GCC-64/x86_64-w64-mingw32/include/stdio.h:449:17: note: previous declaration 'FILE* fopen(const char_, const char_)'
FILE _cdecl fopen(const char * __restrict Filename,const char * restrict Mode) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
^
Makefile:97: recipe for target 'build/c_api/c_api_error.o' failed
mingw32-make: ** [build/c_api/c_api_error.o] Error 1
mingw32-make: *** Waiting for unfinished jobs....
Makefile:97: recipe for target 'build/data/simple_dmatrix.o' failed
mingw32-make: *** [build/data/simple_dmatrix.o] Error 1
In file included from dmlc-core/include/dmlc/data.h:16:0,
from include/xgboost/data.h:11,
from src/data/sparse_page_raw_format.cc:6:
dmlc-core/include/dmlc/./registry.h:218:22: warning: 'xgboost::data::make_SparsePageFormat_raw' defined but not used [-Wunused-variable]
static EntryType & make ## EntryTypeName ## _ ## Name ## __ =
^
src/data/./sparse_batch_page.h:250:3: note: in expansion of macro 'DMLC_REGISTRY_REGISTER'
DMLC_REGISTRY_REGISTER(::xgboost::data::SparsePageFormatReg, SparsePageFormat, Name)
^
src/data/sparse_page_raw_format.cc:93:1: note: in expansion of macro 'XGBOOST_REGISTER_SPARSE_PAGE_FORMAT'
XGBOOST_REGISTER_SPARSE_PAGE_FORMAT(raw)
^
Makefile:97: recipe for target 'build/data/sparse_page_raw_format.o' failed
mingw32-make: *** [build/data/sparse_page_raw_format.o] Error 1
src/c_api/c_api.cc:739:12: warning: 'XGBOOST_LINK_RABIT_C_API' defined but not used [-Wunused-variable]
static int XGBOOST_LINK_RABIT_C_API = RabitLinkTag();
^
Makefile:97: recipe for target 'build/c_api/c_api.o' failed
mingw32-make: *** [build/c_api/c_api.o] Error 1
The text was updated successfully, but these errors were encountered: