8000 Revert "DOC Clean up the advanced installation doc to remove python <… · xhluca/scikit-learn@6917048 · GitHub
[go: up one dir, main page]

Skip to content

Commit 6917048

Browse files
author
Xing
committed
Revert "DOC Clean up the advanced installation doc to remove python < 3.5 parts (scikit-learn#13064)"
This reverts commit 4e83a65.
1 parent b926c30 commit 6917048

File tree

2 files changed

+81
-7
lines changed

2 files changed

+81
-7
lines changed

doc/developers/advanced_installation.rst

Lines changed: 63 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ Building from source
3535
Scikit-learn requires:
3636

3737
- Python (>= 3.5),
38-
- NumPy (>= 1.11),
39-
- SciPy (>= 0.17).
38+
- NumPy (>= 1.8.2),
39+
- SciPy (>= 0.13.3).
4040

4141
.. note::
4242

@@ -46,7 +46,7 @@ Scikit-learn requires:
4646

4747
Building Scikit-learn also requires
4848

49-
- Cython >=0.28.5
49+
- Cython >=0.23
5050

5151
Running tests requires
5252

@@ -165,16 +165,25 @@ Windows
165165
To build scikit-learn on Windows you need a working C/C++ compiler in
166166
addition to numpy, scipy and setuptools.
167167

168-
The building command depends on the architecture of the Python interpreter,
169-
32-bit or 64-bit. You can check the architecture by running the following in
170-
``cmd`` or ``powershell`` console::
168+
Picking the right compiler depends on the version of Python (2 or 3)
169+
and the architecture of the Python interpreter, 32-bit or 64-bit.
170+
You can check the Python version by running the following in ``cmd`` or
171+
``powershell`` console::
172+
173+
python --version
174+
175+
and the architecture with::
171176

172177
python -c "import struct; print(struct.calcsize('P') * 8)"
173178

174179
The above commands assume that you have the Python installation folder in your
175180
PATH environment variable.
176181

177-
You will need `Build Tools for Visual Studio 2017
182+
183+
Python >= 3.5
184+
-------------
185+
186+
For Python versions as of 3.5, you need `Build Tools for Visual Studio 2017
178187
<https://visualstudio.microsoft.com/de/downloads/>`_.
179188

180189
For 64-bit 10000 Python, configure the build environment with::
@@ -189,6 +198,53 @@ And build scikit-learn from this environment::
189198
Replace ``x64`` by ``x86`` to build for 32-bit Python.
190199

191200

201+
32-bit Python (<= 3.4)
202+
----------------------
203+
204+
For 32-bit Python versions up to 3.4 use Microsoft Visual C++ Express 2010.
205+
206+
Once installed you should be able to build scikit-learn without any
207+
particular configuration by running the following command in the scikit-learn
208+
folder::
209+
210+
python setup.py install
211+
212+
213+
64-bit Python (<= 3.4)
214+
----------------------
215+
216+
For 64-bit Python versions up to 3.4, you either need the full Visual Studio or
217+
the free Windows SDKs that can be downloaded from the links below.
218+
219+
The Windows SDKs include the MSVC compilers both for 32 and 64-bit
220+
architectures. They come as a ``GRMSDKX_EN_DVD.iso`` file that can be mounted
221+
as a new drive with a ``setup.exe`` installer in it.
222+
223+
- For Python you need SDK **v7.1**: `MS Windows SDK for Windows 7 and .NET
224+
Framework 4
225+
<https://www.microsoft.com/en-us/download/details.aspx?id=8442>`_
226+
227+
Both SDKs can be installed in parallel on the same host. To use the Windows
228+
SDKs, you need to setup the environment of a ``cmd`` console launched with the
229+
following flags ::
230+
231+
cmd /E:ON /V:ON /K
232+
233+
Then configure the build environment with::
234+
235+
SET DISTUTILS_USE_SDK=1
236+
SET MSSdk=1
237+
"C:\Program Files\Microsoft SDKs\Windows\v7.1\Setup\WindowsSdkVer.exe" -q -version:v7.1
238+
"C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x64 /release
239+
240+
Finally you can build scikit-learn in the same ``cmd`` console::
241+
242+
python setup.py install
243+
244+
Replace ``/x64`` by ``/x86`` to build for 32-bit Python instead of 64-bit
245+
Python.
246+
247+
192248
Building binary packages and installers
193249
---------------------------------------
194250

doc/modules/computing.rst

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -430,6 +430,24 @@ and in this
430430
from Daniel Nouri which has some nice step by step install instructions for
431431
Debian / Ubuntu.
432432

433+
.. warning::
434+
435+
Multithreaded BLAS libraries sometimes conflict with Python's
436+
``multiprocessing`` module, which is used by e.g. ``GridSearchCV`` and
437+
most other estimators that take an ``n_jobs`` argument (with the exception
438+
of ``SGDClassifier``, ``SGDRegressor``, ``Perceptron``,
439+
``PassiveAggressiveClassifier`` and tree-based methods such as random
440+
forests). This is true of Apple's Accelerate and OpenBLAS when built with
441+
OpenMP support.
442+
443+
Besides scikit-learn, NumPy and SciPy also use BLAS internally, as
444+
explained earlier.
445+
446+
If you experience hanging subprocesses with ``n_jobs>1`` or ``n_jobs=-1``,
447+
make sure you have a single-threaded BLAS library, or set ``n_jobs=1``,
448+
or upgrade to Python 3.4 which has a new version of ``multiprocessing``
449+
that should be immune to this problem.
450+
433451
.. _working_memory:
434452

435453
Limiting Working Memory

0 commit comments

Comments
 (0)
0