我按照https://github.com/Microsoft/LightGBM/wiki/Installation-Guide上的安装指南安装LightGBM。在MinGW shell中,我可以下载git repo,然后cd进入build目录。当我尝试尝试以下命令时:
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!
我也尝试从我的路径中删除sh.exe。
有人能指出我可能的解决方案吗?我猜我安装的cmake不正确?
答案 0 :(得分:0)
您可以尝试两次运行cmake -G "MinGW Makefiles" ..
。
答案 1 :(得分:0)
一个简单的解决方案:
pip install lightgbm
问题解决了
答案 2 :(得分:0)
根据lightgbm中显示的要求在conda中创建一个新环境,然后在jupyter中创建一个环境列表并通过更改内核设置根据您的软件包使用它。
如何创建新的环境? 康达创建--n py37_64 python = 3.7 还根据lightgbm的32位或64位下载64位用于: config --env --set subdir win--64
并激活特定的环境,这里是py37_64 所以命令将是: 激活py37_64
并安装lightgbm 点安装lightgbm
enter image description here现在看魔术,并在jupyter笔记本中使用此环境如何?
conda安装nb_conda
要在笔记本中使用此内核,必须先停用env并再次将其激活
现在看您的笔记本
在这里您可以在图像即时消息中实际使用它,现在您可以根据以下内容切换内核 您的要求