"make" cmdλ₯Ό μ¬μ©νλ €κ³ ν λ μ€λ₯κ° λ°μνμ΅λλ€. mingw-64μ TDM-GCC μ»΄νμΌλ¬λ₯Ό λͺ¨λ μλνμ§λ§ μ΄μ΄ μμμ΅λλ€. λ€μμ μ€λ₯ λ‘κ·Έμ λλ€.
$cp make/mingw64.mk config.mk; -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 λΉλ/ c_api/c_api.o src/c_api/c_api.cc > λΉλ/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 λΉλ/ c_api/c_api_error.o src/c_api/c_api_error.cc > λΉλ/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 λΉλ/ λ°μ΄ν°/sparse_page_raw_format.o src/data/sparse_page_raw_format.cc > λΉλ/λ°μ΄ν°/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 λΉλ/ data/simple_dmatrix.o src/data/simple_dmatrix.cc >build/data/simple_dmatrix.d
g++ -m64 -c -std=c++0x -λ²½ -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 λΉλ/c_api/c_api.o
g++ -m64 -c -std=c++0x -λ²½ -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -DDMLC_ENABLE_STD_THREAD=0 -Idmlc-core/include -Irabit/include -fopenmp -c src/ λ°μ΄ν°/sparse_page_raw_format.cc -o λΉλ/λ°μ΄ν°/sparse_page_raw_format.o
g++ -m64 -c -std=c++0x -λ²½ -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 λΉλ/c_api/c_api_error.o
g++ -m64 -c -std=c++0x -λ²½ -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
C:/TDM-GCC-64/x86_64-w64-mingw32/include/locale.h:12:0μ ν¬ν¨λ νμΌμμ,
C:/TDM-GCC-64/lib/gcc/x86_64-w64-mingw32/5.1.0/include/c++/ clocale:42 ,
C:/TDM-GCC-64/lib/gcc/x86_64-w64-mingw32/5.1.0/include/c++/x86_64-w64-mingw32/bits/c++locale.h:41,
C:/TDM-GCC-64/lib/gcc/x86_64-w64-mingw32/5.1.0/include/c++/bits/localefwd.h:40,
C:/TDM-GCC-64/lib/gcc/x86_64-w64-mingw32/5.1.0/include/c++/ string:43 ,
dmlc-core/include/dmlc/base.h:154μμ,
ν¬ν¨/xgboost/data.h:10μμ,
src/data/simple_dmatrix.cc:7μμ:
C:/TDM-GCC-64/x86_64-w64-mingw32/include/stdio.h:450:83: μ€λ₯: 'FILE* std::fopen(const char_, const char_)'μ΄(κ°) 'std' λ΄λΆμ μ μΈλμ΄μΌ ν©λλ€.
FILE _fopen64(const char * νμΌ μ΄λ¦ μ ν , const char * λͺ¨λ μ ν );
^^
C:/TDM-GCC-64/x86_64-w64-mingw32/include/stdio.h:450:83: μ€λ₯: 'FILE_ std::fopen(const char_, const char_)'μ΄ μ΄μ μ μΈκ³Ό μΆ©λν©λλ€.
C:/TDM-GCC-64/x86_64-w64-mingw32/include/stdio.h:449:17: μ°Έκ³ : μ΄μ μ μΈ 'FILE* fopen(const char_, const char_)'
νμΌ _ cdecl fopen(const char * __restrict _νμΌ μ΄λ¦, const char * __restrict__ _Mode) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
^^
C:/TDM-GCC-64/x86_64-w64-mingw32/include/locale.h:12:0μ ν¬ν¨λ νμΌμμ,
C:/TDM-GCC-64/lib/gcc/x86_64-w64-mingw32/5.1.0/include/c++/ clocale:42 ,
C:/TDM-GCC-64/lib/gcc/x86_64-w64-mingw32/5.1.0/include/c++/x86_64-w64-mingw32/bits/c++locale.h:41,
C:/TDM-GCC-64/lib/gcc/x86_64-w64-mingw32/5.1.0/include/c++/bits/localefwd.h:40,
C:/TDM-GCC-64/lib/gcc/x86_64-w64-mingw32/5.1.0/include/c++/ string:43 ,
dmlc-core/include/dmlc/base.h:154μμ,
ν¬ν¨/xgboost/data.h:10μμ,
src/data/sparse_page_raw_format.cc:6μμ:
C:/TDM-GCC-64/x86_64-w64-mingw32/include/stdio.h:450:83: μ€λ₯: 'FILE_ std::fopen(const char_, const char_)'μ΄(κ°) 'std' λ΄λΆμ μ μΈλμ΄μΌ ν©λλ€.
FILE _fopen64(const char * νμΌ μ΄λ¦ μ ν , const char * λͺ¨λ μ ν );
^^
C:/TDM-GCC-64/x86_64-w64-mingw32/include/stdio.h:450:83: μ€λ₯: 'FILE_ std::fopen(const char_, const char_)'μ΄ μ΄μ μ μΈκ³Ό μΆ©λν©λλ€.
C:/TDM-GCC-64/x86_64-w64-mingw32/include/stdio.h:449:17: μ°Έκ³ : μ΄μ μ μΈ 'FILE* fopen(const char_, const char_)'
νμΌ _ cdecl fopen(const char * __restrict _νμΌ μ΄λ¦, const char * __restrict__ _Mode) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
^^
C:/TDM-GCC-64/x86_64-w64-mingw32/include/locale.h:12:0μ ν¬ν¨λ νμΌμμ,
C:/TDM-GCC-64/lib/gcc/x86_64-w64-mingw32/5.1.0/include/c++/ clocale:42 ,
C:/TDM-GCC-64/lib/gcc/x86_64-w64-mingw32/5.1.0/include/c++/x86_64-w64-mingw32/bits/c++locale.h:41,
C:/TDM-GCC-64/lib/gcc/x86_64-w64-mingw32/5.1.0/include/c++/bits/localefwd.h:40,
C:/TDM-GCC-64/lib/gcc/x86_64-w64-mingw32/5.1.0/include/c++/ string:43 ,
dmlc-core/include/dmlc/base.h:154μμ,
src/c_api/./c_api_error.h:9μμ,
src/c_api/c_api_error.cc:6μμ:
C:/TDM-GCC-64/x86_64-w64-mingw32/include/stdio.h:450:83: μ€λ₯: 'FILE_ std::fopen(const char_, const char_)'μ΄(κ°) 'std' λ΄λΆμ μ μΈλμ΄μΌ ν©λλ€.
FILE _fopen64(const char * νμΌ μ΄λ¦ μ ν , const char * λͺ¨λ μ ν );
^^
C:/TDM-GCC-64/x86_64-w64-mingw32/include/stdio.h:450:83: μ€λ₯: 'FILE_ std::fopen(const char_, const char_)'μ΄(κ°) μ΄μ μ μΈκ³Ό μΆ©λν©λλ€.
C:/TDM-GCC-64/x86_64-w64-mingw32/include/stdio.h:449:17: μ°Έκ³ : μ΄μ μ μΈ 'FILE* fopen(const char_, const char_)'
νμΌ _ cdecl fopen(const char * __restrict _νμΌ μ΄λ¦, const char * __restrict__ _Mode) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
^^
C:/TDM-GCC-64/x86_64-w64-mingw32/include/locale.h:12:0μ ν¬ν¨λ νμΌμμ,
C:/TDM-GCC-64/lib/gcc/x86_64-w64-mingw32/5.1.0/include/c++/ clocale:42 ,
C:/TDM-GCC-64/lib/gcc/x86_64-w64-mingw32/5.1.0/include/c++/x86_64-w64-mingw32/bits/c++locale.h:41,
C:/TDM-GCC-64/lib/gcc/x86_64-w64-mingw32/5.1.0/include/c++/bits/localefwd.h:40,
C:/TDM-GCC-64/lib/gcc/x86_64-w64-mingw32/5.1.0/include/c++/ string:43 ,
dmlc-core/include/dmlc/base.h:154μμ,
ν¬ν¨/xgboost/data.h:10μμ,
src/c_api/c_api.cc:3μμ:
C:/TDM-GCC-64/x86_64-w64-mingw32/include/stdio.h:450:83: μ€λ₯: 'FILE_ std::fopen(const char_, const char_)'μ΄(κ°) 'std' λ΄λΆμ μ μΈλμ΄μΌ ν©λλ€.
FILE _fopen64(const char * νμΌ μ΄λ¦ μ ν , const char * λͺ¨λ μ ν );
^^
C:/TDM-GCC-64/x86_64-w64-mingw32/include/stdio.h:450:83: μ€λ₯: 'FILE_ std::fopen(const char_, const char_)'μ΄(κ°) μ΄μ μ μΈκ³Ό μΆ©λν©λλ€.
C:/TDM-GCC-64/x86_64-w64-mingw32/include/stdio.h:449:17: μ°Έκ³ : μ΄μ μ μΈ 'FILE* fopen(const char_, const char_)'
νμΌ _ cdecl fopen(const char * __restrict _νμΌ μ΄λ¦, const char * __restrict__ _Mode) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
^^
Makefile:97 : λμ 'build/c_api/c_api_error.o'μ λν λ μνΌκ° μ€ν¨νμ΅λλ€.
mingw32-make: _* [λΉλ/c_api/c_api_error.o] μ€λ₯ 1mingw32-make: * λλμ§ μμ μμ
μ κΈ°λ€λ¦¬λ μ€....Makefile:97 : 'build/data/simple_dmatrix.o' λμμ λν λ μνΌκ° μ€ν¨νμ΅λλ€.mingw32-make: * * [build/data/simple_dmatrix.o] μ€λ₯ 1
dmlc-core/include/dmlc/data.h:16:0μ ν¬ν¨λ νμΌμμ
include/xgboost/data.h:11μμ,
src/data/sparse_page_raw_format.cc:6μμ:
dmlc-core/include/dmlc/./registry.h:218:22: κ²½κ³ : 'xgboost::data::make_SparsePageFormat_raw *'κ° μ μλμμ§λ§ μ¬μ©λμ§ μμ [-Wunused-variable]μ μ νλͺ© μ ν & __make_ ## νλͺ© μ ν μ΄λ¦ ## _ ## μ΄λ¦ ## __ =^^src/data/./sparse_batch_page.h:250:3: μ°Έκ³ : 맀ν¬λ‘ 'DMLC_REGISTRY_REGISTER' νμ₯ μDMLC_REGISTRY_REGISTER(::xgboost::data::SparsePageFormatReg, SparsePageFormat, μ΄λ¦)^^src/data/sparse_page_raw_format.cc:93:1: μ°Έκ³ : 맀ν¬λ‘ 'XGBOOST_REGISTER_SPARSE_PAGE_FORMAT' νμ₯ μXGBOOST_REGISTER_SPARSE_PAGE_FORMAT(μμ)^^Makefile:97 : λμ 'build/data/sparse_page_raw_format.o'μ λν λ μνΌκ° μ€ν¨νμ΅λλ€.mingw32-make: * * [build/data/sparse_page_raw_format.o] μ€λ₯ 1
src/c_api/c_api.cc:739:12: κ²½κ³ : 'XGBOOST_LINK_RABIT_C_API_'κ° μ μλμμ§λ§ μ¬μ©λμ§ μμ [-Wunused-variable]
μ μ int XGBOOST_LINK_RABIT_C_API_ = RabitLinkTag();
^^
Makefile:97 : λμ 'build/c_api/c_api.o'μ λν λ μνΌκ° μ€ν¨νμ΅λλ€.
mingw32-make: *** [λΉλ/c_api/c_api.o] μ€λ₯ 1
λλ κ°μ λ¬Έμ λ₯Ό μκ³ μμ΄!!
λλ κ°μ λ¬Έμ λ₯Ό μκ³ μμ΄.
μ¬κΈ°λ λ§μ°¬κ°μ§!
κ°μ.......
Windowsλ μ€μ λ‘ mlλ₯Ό μννκΈ°μ μ’μ μ νμ΄ μλλλ€.
@ziqilau @tqchen @JasonTianCHD @yanqingmen
μμ λ¨, repoλ₯Ό 볡μ ν λ€μ μμ λ λκΉμ§ 9a48a40μΌλ‘ 체ν¬μμνμμμ€. λ§μ§λ§ 컀λ°μμ μ»΄νμΌμ λ§μ³€μ κ²μ
λλ€.
git clone --recursive https://github.com/dmlc/xgboost
cd xgboost
git checkout 9a48a40
git submodule init
git submodule update
건배!
λλ μ΄κ²μ΄ λΉλΆκ° μλνλ κ²μ νμΈν μ μμ΅λλ€. μ λ§ κ°μ¬ν©λλ€!
μ, 2μΌ λμ μ΄μ§λ½ν ν Cortajarenaμ μμ μ¬νμ΄ μλνμ΅λλ€! μ λ§ κ³ λ§μ΅λλ€!!
κ°μ¬ ν΄μ !! @μ½λ₯΄νμλ λ
@Cortajarena κ°μ¬
@Cortajarena κ°μ¬
@Cortajarena κ°μ¬ν©λλ€!
_νμ§λ§ jupyter nootbookμμ xgboostλ₯Ό importνμ λ_
μμ
OS
mingw_path = "C:TDM-GCC-64bin"
os.environ['κ²½λ‘'] = mingw_path + ';' + os.environ['κ²½λ‘']
xgboostλ₯Ό xgbλ‘ κ°μ Έμ€κΈ°
_μ€λ₯ λ©μμ§κ° λνλ©λλ€:_
OSError μΆμ (κ°μ₯ μ΅κ·Ό νΈμΆ λ§μ§λ§)
----> 1 xgboostλ₯Ό xgbλ‘ κ°μ Έμ€κΈ°
C:UsersLAnaconda3libsite-packagesxgboost-0.4-py3.5.eggxgboost__init__.py in
9 μμ
OS
10
---> .coreμμ 11 κ°μ Έμ€κΈ° DMatrix, Booster
.training μμ
μ΄μ°¨μμ 12, μ΄λ ₯μ
λΆν° 13. μμ
ν λΌ # λ
ΈμΉ΄
C:UsersLAnaconda3libsite-packagesxgboost-0.4-py3.5.eggxgboostcore.py in
110
111 # XGBoost λΌμ΄λΈλ¬λ¦¬λ₯Ό μ μμ μΌλ‘ λ‘λ
--> 112 _LIB = _λ‘λ_lib()
113
114
C:UsersLAnaconda3libsite-packagesxgboost-0.4-py3.5.eggxgboostcore.py _load_lib()
104 if len(lib_path) == 0:
105 λ°ν μμ
--> 106 λΌμ΄λΈλ¬λ¦¬ = ctypes.cdll.LoadLibrary(lib_path[0])
107 lib.XGBGetLastError.restype = ctypes.c_char_p
108 λ°ν λΌμ΄λΈλ¬λ¦¬
LoadLibrary(self, name)μ C:UsersLAnaconda3libctypes__init__.py
423
424ν
--> 425 λ°ν self._dlltype(μ΄λ¦)
426
427*
C:UsersLAnaconda3libctypes__init__.py init (self, name, mode, handle, use_errno, use_last_error)
345
346 νΈλ€μ΄ μμμΈ κ²½μ°:
--> 347 self._handle = _dlopen(self._name, λͺ¨λ)
348 κΈ°ν:
349ν
OSError: [WinError 1114] DLL(λμ μ°κ²° λΌμ΄λΈλ¬λ¦¬) μ΄κΈ°ν 루ν΄μ΄ μ€ν¨νμ΅λλ€.
λꡬλ μ§ κ°μ λ¬Έμ κ° μμμ΅λκΉ? κ·Έκ²μ κ³ μΉλ λ°©λ²?
νμ μ£Όμ @Cortajarena μκ² κ°μ¬λ립λλ€!
"XGBoost λΌμ΄λΈλ¬λ¦¬λ₯Ό ν보 κ²½λ‘μμ μ°Ύμ μ μμ΅λλ€"λΌλ νμ μ€λ₯κ° λ°μνλ μ¬λμ΄ μμ΅λκΉ?
Windows7μμ Python 3.5.1κ³Ό ν¨κ» Anaconda 4.0.0μ μ¬μ©νκ³ μμ΅λλ€.
λ€μ λͺ
λ Ήμ΄ μ λλ‘ μλνμ΅λλ€.
git clone --recursive https://github.com/dmlc/xgboost
cd xgboost
git checkout 9a48a40
git submodule init
git submodule update
Anaconda Promptλ‘ λ€μ μ ννμ λ python-packages ν΄λλ‘ λ¦¬λλ μ λμ΄ λ€μμ μλνμ΅λλ€.
python setup.py install
λΌμ΄λΈλ¬λ¦¬λ₯Ό μ°Ύμ μ μμΌλ©° ν보 λͺ©λ‘μ μ 곡νλ€λ μ€λ₯λ₯Ό λ°μμ΅λλ€.
μμ λ°©λ²μ λν μμ΄λμ΄?
@lrvenable
μ΄λ¦μ μ§μ ν λ¨κ³λ₯Ό μνν ν λ€μμ μ λ ₯ν©λλ€.
cd python-package
κ·Έλ° λ€μ python ν¨ν€μ§ λλ ν 리(μ΄λ―Έ 볡μ ν 리ν¬μ§ν 리μ xgboost ν΄λ λ΄λΆ)μ μμ΅λλ€.
κ·Έλ° λ€μ μ½μμ λ€μμ μ
λ ₯ν©λλ€.
python setup.py install
Windows λͺ
λ Ή ν둬ννΈ λμ λΉνΈ bashλ₯Ό μ¬μ©ν΄μΌ ν©λλ€!
건배!
@Cortajarena λΉμ μ μ λμ μΈ κ΅¬μΈμ£Όμ λλ€. λ§μ, λ§μ κ°μ¬ν©λλ€!
λλ₯Ό μν΄ λ¬Έμ λ₯Ό ν΄κ²°νμ΅λλ€(Win7 64Bit, mingw-w64).
...dmlc-coreincludedmlcbase.h λΌμΈ 110++ (https://github.com/dmlc/xgboost/commit/75d9be55de7e13a0075b4422c37a74f7b39600b1 컀λ°)
=>
μ μ€νΈλ¦Ό λ¬Έμ κ° μμ λμκ³ dmlc-coreμ λν μ°Έμ‘°κ° #1408 μ λ°μ΄νΈλμμ΅λλ€. μ¬λλ€μ΄ 6μ 5μΌ λ²μ μ μ½λλ₯Ό κ³μ μ€μΉνμ§ μλλ‘ λκ΅°κ° μ΄ λ¬Έμ λ₯Ό λ«μμΌ νλ€κ³ μ μν©λλ€.
Windows 7μμ R ν¨ν€μ§λ₯Ό λΉλνκ³ μμμ΅λλ€. CRANμ μ΅μ xgboost ν¨ν€μ§κ° λΉλλμ§ μμμ΅λλ€.
@Far0n μ μ루μ μ΄ μ μκ²
@Cortajarena @lrvenable
λλ κ·Έκ²μ μ»λλ€
$ python setup.py install
Traceback (most recent call last):
File "setup.py", line 19, in <module>
LIB_PATH = libpath['find_lib_path']()
File "xgboost/libpath.py", line 45, in find_lib_path
'List of candidates:\n' + ('\n'.join(dll_path)))
XGBoostLibraryNotFound: Cannot find XGBoost Libarary in the candicate path, did you install compilers and run build.sh in root path?
List of candidates:
~/xgboost/xgboost/python-package/xgboost/libxgboost.so
~/xgboost/xgboost/python-package/xgboost/../../lib/libxgboost.so
~/xgboost/xgboost/python-package/xgboost/./lib/libxgboost.so
κ°μ₯ μ μ©ν λκΈ
@ziqilau @tqchen @JasonTianCHD @yanqingmen
μμ λ¨, repoλ₯Ό 볡μ ν λ€μ μμ λ λκΉμ§ 9a48a40μΌλ‘ 체ν¬μμνμμμ€. λ§μ§λ§ 컀λ°μμ μ»΄νμΌμ λ§μ³€μ κ²μ λλ€.
git clone --recursive https://github.com/dmlc/xgboost
cd xgboost
git checkout 9a48a40
git submodule init
git submodule update
건배!