All requirements, except the **OpenMP** requirement, from `Build from Sources section <#build-from-sources>`__ apply for this installation option as well.
All requirements, except the **OpenMP** requirement, from `Build from Sources section <#build-from-sources>`__ apply for this installation option as well.
All available options that can be passed via ``cmake.define.{option}``.
- boost-root
- Boost_ROOT
- boost-dir
- Boost_DIR
- boost-include-dir
- Boost_INCLUDE_DIR
- boost-librarydir
- BOOST_LIBRARYDIR
- opencl-include-dir
- OpenCL_INCLUDE_DIR
- opencl-library
- OpenCL_LIBRARY
For more details see `FindBoost <https://cmake.org/cmake/help/latest/module/FindBoost.html>`__ and `FindOpenCL <https://cmake.org/cmake/help/latest/module/FindOpenCL.html>`__.
For more details see `FindBoost <https://cmake.org/cmake/help/latest/module/FindBoost.html>`__ and `FindOpenCL <https://cmake.org/cmake/help/latest/module/FindOpenCL.html>`__.
All requirements from `Build from Sources section <#build-from-sources>`__ apply for this installation option as well, and `CMake`_ (version 3.16 or higher) is strongly required.
All requirements from `Build from Sources section <#build-from-sources>`__ apply for this installation option as well, and `CMake`_ (version 3.16 or higher) is strongly required.
`CMake`_ and `MinGW-w64 <https://www.mingw-w64.org/>`_ should be installed first.
`CMake`_ and `MinGW-w64 <https://www.mingw-w64.org/>`_ should be installed first.
...
@@ -155,7 +160,10 @@ Build 32-bit Version with 32-bit Python
...
@@ -155,7 +160,10 @@ Build 32-bit Version with 32-bit Python
.. code:: sh
.. code:: sh
pip install lightgbm --install-option=--bit32
# in sh.exe, git bash, or other Unix-like shell
export CMAKE_GENERATOR='Visual Studio 17 2022'
export CMAKE_GENERATOR_PLATFORM='Win32'
pip install --no-binary lightgbm lightgbm
By default, installation in environment with 32-bit Python is prohibited. However, you can remove this prohibition on your own risk by passing ``bit32`` option.
By default, installation in environment with 32-bit Python is prohibited. However, you can remove this prohibition on your own risk by passing ``bit32`` option.
Use this option to make LightGBM output time costs for different internal routines, to investigate and benchmark its performance.
Use this option to make LightGBM output time costs for different internal routines, to investigate and benchmark its performance.
...
@@ -221,6 +229,21 @@ Build Wheel File
...
@@ -221,6 +229,21 @@ Build Wheel File
You can use ``sh ./build-python.sh install bdist_wheel`` instead of ``sh ./build-python.sh install`` to build wheel file and use it for installation later. This might be useful for systems with restricted or completely without network access.
You can use ``sh ./build-python.sh install bdist_wheel`` instead of ``sh ./build-python.sh install`` to build wheel file and use it for installation later. This might be useful for systems with restricted or completely without network access.
Build With MSBuild
******************
To use ``MSBuild`` (Windows-only), first build ``lib_lightgbm.dll`` by running the following from the root of the repo.