LightGBM Python Package
Project description
Installation
Preparation
You need to install cmake and setuptools first.
For Windows users, Visual Studio (or MS Build) is needed. You also can use MinGW instead if installing from GitHub.
For Mac OS X users, gcc with OpenMP support must be installed first. Refer to wiki for installing gcc with OpenMP support.
Note: 32-bit python is not supported. Please install 64-bit version.
Install from pip
pip install lightgbm
For the MinGW build in Windows and GPU support, please install the latest version from GitHub.
Install from GitHub
git clone --recursive https://github.com/Microsoft/LightGBM
cd LightGBM/python-package
python setup.py install
You may need to use sudo (or administrator rights in Windows) to perform python setup.py install.
Use python setup.py install --mingw to use MinGW in Windows.
Use python setup.py install --gpu to enable GPU support. You will need to install Boost and OpenCL first: details for installation can be found in gpu-support.
Examples
Refer to the walk through examples in python-guide folder
Troubleshooting
Refer to FAQ
Developments
The code style of python package follows pep8. If you would like to make a contribution and not familiar with pep-8, please check the pep8 style guide first. Otherwise, you won’t pass the check. You should be careful about:
E1 Indentation (check pep8 link above)
E202 whitespace before and after brackets
E225 missing whitespace around operator
E226 missing whitespace around arithmetic operator
E261 at least two spaces before inline comment
E301 expected 1 blank line in front of and at the end of a method
E302 expected 2 blank lines in front of and at the end of a function or a class
You can ignore E501 (line too long).
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for lightgbm-2.0.2-py2.py3-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9d23ae9da74190e6a556754399fa03c661d76269795392db2de35a90f1a64a94 |
|
MD5 | 2148d41802d598269fa8c91c073d9534 |
|
BLAKE2b-256 | f211e1c69bf013666d7ba94ba83ff3a29d653647a061c6c0ba6ebbc4b0bbe564 |
Hashes for lightgbm-2.0.2-py2.py3-none-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fa0dd0a3de2ba8174e44ab80ed8deec83028cfa0aec93b0ea2728491a25f8c91 |
|
MD5 | 0def5fb67cf5da30af77adc68846a459 |
|
BLAKE2b-256 | dd6ead65a22a6bd4e12f6efd4575f127076dc3438ce146a7ac3d31d24556d6cc |
Hashes for lightgbm-2.0.2-py2.py3-none-macosx_10_9_x86_64.macosx_10_10_x86_64.macosx_10_11_x86_64.macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 43e3d53ec53429bb7d497765336ad4886357244e020ae782f1c7425fbbdcaeb9 |
|
MD5 | 6fc69a8ad10f7818013288356cd3d379 |
|
BLAKE2b-256 | 0ea51ff85acb5ac02db8a5d8c0e4ebef1376cdf1777a837a3bffb112b10ce784 |