Skip to content

Commit

Permalink
[docs] Simplify the python installation instruction (#3378)
Browse files Browse the repository at this point in the history
* Update Python-Intro.rst

* Update README.rst
  • Loading branch information
guolinke authored Sep 11, 2020
1 parent 0c708d3 commit 0d45ebd
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
7 changes: 3 additions & 4 deletions docs/Python-Intro.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,13 @@ This document gives a basic walkthrough of LightGBM Python-package.
Install
-------

Install Python-package dependencies,
``setuptools``, ``wheel``, ``numpy`` and ``scipy`` are required, ``scikit-learn`` is required for sklearn interface and recommended:
You can install LightGBM via pip

::

pip install setuptools wheel numpy scipy scikit-learn -U
pip install lightgbm

Refer to `Python-package`_ folder for the installation guide.
Refer to `Python-package`_ folder for the detailed installation guide.

To verify your installation, try to ``import lightgbm`` in Python:

Expand Down
12 changes: 7 additions & 5 deletions python-package/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@ Preparation
Install from `PyPI <https://pypi.org/project/lightgbm>`_ Using ``pip``
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

.. code:: sh
pip install lightgbm
You may need to install `wheel <https://pythonwheels.com>`_ via ``pip install wheel`` first.

For **Windows** users, `VC runtime <https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads>`_ is needed if **Visual Studio** (2015 or newer) is not installed.

For **Linux** users, **glibc** >= 2.14 is required.
Expand All @@ -28,11 +35,6 @@ For **macOS** (we provide wheels for 3 newest macOS versions) users:

- For version smaller than 2.1.2, **gcc-7** with **OpenMP** is required.

Install `wheel <https://pythonwheels.com>`_ via ``pip install wheel`` first. After that download the wheel file and install from it:

.. code:: sh
pip install lightgbm

Build from Sources
******************
Expand Down

0 comments on commit 0d45ebd

Please sign in to comment.