2017-06-19 183 views
1

我按照安裝指南找到https://github.com/Microsoft/LightGBM/wiki/Installation-Guide來安裝LightGBM。在MinGW shell中,我可以下載git repo,然後cd進入build目錄。當我試試下面的命令:LightGBM安裝問題 - Python

cmake -G "MinGW Makefiles" .. 

我得到以下錯誤:

CMake Error at C:/Program Files/CMake/share/cmake- 
3.9/Modules/CMakeMinGWFindMake.cmake:12 (message): 
sh.exe was found in your PATH, here: 

C:/Program Files/Git/usr/bin/sh.exe 

For MinGW make to work correctly sh.exe must NOT be in your path. 

Run cmake from a shell that does not have sh.exe in your PATH. 

If you want to use a UNIX shell, then use MSYS Makefiles. 

Call Stack (most recent call first): 
CMakeLists.txt:8 (PROJECT) 


CMake Error: CMake was unable to find a build program corresponding to 
"MinGW Makefiles". CMAKE_MAKE_PROGRAM is not set. You probably need to 
select a different build tool. 
CMake Error: CMake was unable to find a build program corresponding to " 
MinGW Makefiles". CMAKE_MAKE_PROGRAM is not set. You probably need to 
select a different build tool. 
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage 
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage 
-- Configuring incomplete, errors occurred! 

我也tryed從我的路徑移除sh.exe。

任何人都可以指出我可能的解決方案嗎?我猜測我安裝cmake不正確?

+0

我的猜測是它無法找到的GNU make'。你有完整的MinGW還是隻有Git的一個? – yorodm

+0

認爲我有一個與Git來...發現這裏:https://git-scm.com/downloads –

+0

在他們的[安裝指南](https://github.com/Microsoft/LightGBM/wiki/Installation - 指南)他們要求MinGW64,嘗試安裝它並使用該環境編譯 – yorodm

回答

0

一個簡單的解決方案提出了自己:

pip install lightgbm 

問題解決

0

您可以嘗試運行cmake -G "MinGW Makefiles" ..兩次。

+0

你能否詳細說明爲什麼這會起作用? – mattjegan