"git@developer.sourcefind.cn:tianlh/lightgbm-dcu.git" did not exist on "877d58fac74731a5feba8d6ca3bb0cc97d154eb0"
Unverified Commit 2e603f86 authored by James Lamb's avatar James Lamb Committed by GitHub
Browse files

[python-package] add 'pandas' extra (#5937)

parent 3df9698b
...@@ -34,6 +34,28 @@ For **macOS** (we provide wheels for 3 newest macOS versions) users: ...@@ -34,6 +34,28 @@ For **macOS** (we provide wheels for 3 newest macOS versions) users:
- For version smaller than 2.1.2, **gcc-7** with **OpenMP** is required. - For version smaller than 2.1.2, **gcc-7** with **OpenMP** is required.
Use LightGBM with Dask
**********************
.. warning::
Dask-package is only tested on Linux.
To install all dependencies needed to use ``lightgbm.dask``, append ``[dask]``.
.. code:: sh
pip install 'lightgbm[dask]'
Use LightGBM with pandas
************************
To install all dependencies needed to use ``pandas`` in LightGBM, append ``[pandas]``.
.. code:: sh
pip install 'lightgbm[pandas]'
Build from Sources Build from Sources
****************** ******************
...@@ -242,21 +264,6 @@ Then install the Python package using that library. ...@@ -242,21 +264,6 @@ Then install the Python package using that library.
sh ./build-python.sh install --precompile sh ./build-python.sh install --precompile
Install Dask-package
''''''''''''''''''''
.. warning::
Dask-package is only tested on Linux.
To install all additional dependencies required for Dask-package, you can append ``[dask]`` to LightGBM package name:
.. code:: sh
pip install lightgbm[dask]
Or replace ``sh ./build-python.sh install`` with ``pip install -e .[dask]`` if you are installing the package from source files.
Troubleshooting Troubleshooting
--------------- ---------------
......
...@@ -26,6 +26,15 @@ readme = "README.rst" ...@@ -26,6 +26,15 @@ readme = "README.rst"
requires-python = ">=3.6" requires-python = ">=3.6"
version = "3.3.5.99" version = "3.3.5.99"
[project.optional-dependencies]
dask = [
"dask[array,dataframe,distributed]>=2.0.0",
"pandas>=0.24.0"
]
pandas = [
"pandas>=0.24.0"
]
[project.urls] [project.urls]
homepage = "https://github.com/microsoft/LightGBM" homepage = "https://github.com/microsoft/LightGBM"
documentation = "https://lightgbm.readthedocs.io/en/latest/" documentation = "https://lightgbm.readthedocs.io/en/latest/"
......
...@@ -5,13 +5,6 @@ install_requires = ...@@ -5,13 +5,6 @@ install_requires =
scikit-learn!=0.22.0 scikit-learn!=0.22.0
scipy scipy
[options.extras_require]
dask =
dask[array]>=2.0.0
dask[dataframe]>=2.0.0
dask[distributed]>=2.0.0
pandas
[options.packages.find] [options.packages.find]
where = lightgbm where = lightgbm
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment