# 使用 Homebrew, Nix, MacPorts, winget 安装 lightgbm

查看 lightgbm 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

```sh
sudo av install brew:lightgbm
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install lightgbm
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install LightGBM
```

  证据: MacPorts ports tree: math/LightGBM/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- Nix (92%):

```sh
nix profile install nixpkgs#lightgbm
```

  证据: nixpkgs package indexes: pkgs/by-name/li/lightgbm/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

### Windows

- winget (92%):

```sh
winget install --id Microsoft.LightGBM -e
```

  证据: Windows Package Manager source index: Microsoft.LightGBM from https://cdn.winget.microsoft.com/cache/source.msix

## 软件包事实

- **软件包键:** brew:lightgbm
- **软件包管理器:** Homebrew
- **版本:** 4.7.0
- **来源摘要:** Fast, distributed, high performance gradient boosting framework
- **主页:** <https://lightgbm.readthedocs.io/en/latest/>
- **仓库:** <https://github.com/lightgbm-org/LightGBM>
- **最后更新:** 2026-07-18T21:02:43Z
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- lightgbm (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

- 页面生成时间: 2026-08-03
- 管理器版本: 4.7.0
## 项目历史与用法

LightGBM, short for Light Gradient Boosting Machine, is a high-performance gradient boosting framework for tree-based learning. It became one of the standard packages for tabular machine learning because it combines fast histogram-based training, low memory use, categorical-feature handling, and parallel or distributed execution.

### 项目历史

The GitHub repository was created on 2016-08-05. The README describes LightGBM as a gradient boosting framework designed for faster training, lower memory usage, better accuracy, parallel and distributed learning, GPU learning, and large-scale data.

The official papers connect the implementation to Microsoft Research work on communication-efficient parallel decision trees in 2016 and the 2017 NIPS paper "LightGBM: A Highly Efficient Gradient Boosting Decision Tree." The paper introduced Gradient-based One-Side Sampling and Exclusive Feature Bundling as key techniques for speeding up GBDT training.

The repository moved from Microsoft/LightGBM to lightgbm-org/LightGBM in March 2026. The maintainers documented the move in issue 7187 and stated that the same maintainers, including the creator of LightGBM, continued managing the official source repository.

### 采用历史

The README says LightGBM has been widely used in winning machine-learning competition solutions. Its package footprint spans command-line binaries, Python, R, conda, CRAN, NuGet, Winget, Homebrew, and downstream integrations such as Spark-oriented wrappers and inference converters.

LightGBM's adoption followed a practical need in tabular-data workflows: teams wanted XGBoost-class accuracy with faster training iterations and better memory behavior on large datasets.

### 使用方式

Users train models from the CLI or language bindings for regression, classification, ranking, and large-scale distributed tasks. Common package-manager use cases include installing the CLI for experiments, installing Python or R bindings for notebooks and pipelines, and installing the library as a dependency of higher-level ML systems.

### 为什么软件包爱好者会关心

LightGBM is package-nerd significant because it is a research system that became packaging infrastructure: native C++, Python wheels, R packages, GPU builds, distributed modes, and many downstream wrappers all have to agree on the same fast tree learner.

It is also a canonical example of ML packaging complexity, where one upstream project must serve CLI users, language-binding users, GPU users, and distro maintainers without losing performance-sensitive native code paths.

### 时间线

- 2016-08-05: GitHub repository created.
- 2016: NIPS paper on communication-efficient parallel decision trees published by LightGBM authors.
- 2017-02-27: Official experiment documentation records the first version of comparison and parallel experiments.
- 2017: NIPS paper "LightGBM: A Highly Efficient Gradient Boosting Decision Tree" published.
- 2018: GPU acceleration paper cited by the README.
- 2020-03-08: Official experiment documentation updated against a then-new master branch.
- 2022: Quantized training paper cited by the README.
- 2026-03: Repository moved from Microsoft/LightGBM to lightgbm-org/LightGBM.

### Related projects

- Related projects include XGBoost, scikit-learn integrations, SynapseML, FLAML, Optuna, Treelite, SHAP, ML.NET, ONNX conversion tools, and many language bindings listed by the LightGBM README.

### 来源

- <https://api.github.com/repos/lightgbm-org/LightGBM>
- <https://formulae.brew.sh/formula/lightgbm>
- <https://github.com/lightgbm-org/LightGBM>
- <https://github.com/lightgbm-org/LightGBM/issues/7187>
- <https://lightgbm.readthedocs.io/en/stable/Features.html>
- <https://papers.nips.cc/paper/6907-lightgbm-a-highly-efficient-gradient-boosting-decision-tree>
- <https://raw.githubusercontent.com/lightgbm-org/LightGBM/master/README.md>
- <https://raw.githubusercontent.com/lightgbm-org/LightGBM/master/docs/Experiments.rst>


## 安全说明

narrow executable package without higher-risk signals.

- **Geiger 风险:** 绿色 / 低
- narrow executable package without higher-risk signals

## 其他软件包管理器记录

- Nix - lightgbm: normalized package name match | nixpkgs package indexes: pkgs/by-name/li/lightgbm/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- MacPorts - LightGBM: normalized package name match | MacPorts ports tree: math/LightGBM/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1
- winget - Microsoft.LightGBM: normalized package name match | Windows Package Manager source index: Microsoft.LightGBM from https://cdn.winget.microsoft.com/cache/source.msix


## Combined YAML source

View the package source record on GitHub. [combined/lightgbm.yml](https://github.com/mxcl/pkgdb/blob/main/combined/lightgbm.yml)


## 来源

- pkg.so package database
- Geiger risk classifier
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
