[docs] Simplify the python installation instruction (#3378)

* Update Python-Intro.rst

* Update README.rst
This commit is contained in:
Guolin Ke 2020-09-12 04:10:30 +08:00 коммит произвёл GitHub
Родитель 0c708d37dd
Коммит 0d45ebd65c
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
2 изменённых файлов: 10 добавлений и 9 удалений

Просмотреть файл

@ -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:

Просмотреть файл

@ -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.
@ -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
******************