<commit_before>Building and installing NumPy
+++++++++++++++++++++++++++++

**IMPORTANT**: the below notes are about building NumPy, which for most users
is *not* the recommended way to install NumPy.  Instead, use either a complete
scientific Python distribution (recommended) or a binary installer - see
http://scipy.org/install.html.


.. Contents::

Prerequisites
=============

Building NumPy requires the following software installed:

1) For Python 2, Python__ 2.7.x or newer.
   For Python 3, Python__ 3.4.x or newer.

   On Debian and derivative (Ubuntu): python python-dev

   On Windows: the official python installer on Python__ is enough

   Make sure that the Python package distutils is installed before
   continuing. For example, in Debian GNU/Linux, distutils is included
   in the python-dev package.

   Python must also be compiled with the zlib module enabled.

2) Cython >= 0.19 (for development versions of numpy, not for released
                   versions)
3) nose__ (optional) 1.0 or later

   This is required for testing numpy, but not for using it.

Python__ http://www.python.org
nose__ http://nose.readthedocs.io


.. note:: 

   If you want to build NumPy in order to work on NumPy itself, use
   ``runtests.py``.  For more details, see
   http://docs.scipy.org/doc/numpy-dev/dev/development_environment.html

.. note::

   More extensive information on building NumPy (and Scipy) is maintained at
   http://scipy.org/scipylib/building/index.html


Basic Installation
==================

To install numpy run::

    python setup.py build -j 4 install --prefix $HOME/.local

This will compile numpy on 4 CPUs and install it into the specified prefix.
To perform an inplace build that can be run from the source folder run::

    python setup.py build_ext --inplace -j 4

The number of build jobs can also be specified via the environment variable
NPY_NUM_BUILD_JOBS.


Choosing compilers
==================

NumPy needs a C compiler, and for development versions also Cython.  A Fortran
compiler isn't needed to build NumPy itself; the ``numpy.f2py`` tests will be
skipped when running the test suite if no Fortran compiler is available.  For
building Scipy a Fortran compiler is needed though, so we include some details
on Fortran compilers in the rest of this section.<commit_msg>DOC:Add installation notes for Linux users<commit_after>Building and installing NumPy
+++++++++++++++++++++++++++++

**IMPORTANT**: the below notes are about building NumPy, which for most users
is *not* the recommended way to install NumPy.  Instead, use either a complete
scientific Python distribution (recommended) or a binary installer - see
http://scipy.org/install.html.


.. Contents::

Prerequisites
=============

Building NumPy requires the following software installed:

1) For Python 2, Python__ 2.7.x or newer.
   For Python 3, Python__ 3.4.x or newer.

   On Debian and derivative (Ubuntu): python python-dev

   On Windows: the official python installer on Python__ is enough

   Make sure that the Python package distutils is installed before
   continuing. For example, in Debian GNU/Linux, distutils is included
   in the python-dev package.

   Python must also be compiled with the zlib module enabled.

2) Cython >= 0.19 (for development versions of numpy, not for released
                   versions)
3) nose__ (optional) 1.0 or later

   This is required for testing numpy, but not for using it.

Python__ http://www.python.org
nose__ http://nose.readthedocs.io


.. note:: 

   If you want to build NumPy in order to work on NumPy itself, use
   ``runtests.py``.  For more details, see
   http://docs.scipy.org/doc/numpy-dev/dev/development_environment.html

.. note::

   More extensive information on building NumPy (and Scipy) is maintained at
   http://scipy.org/scipylib/building/index.html


Basic Installation
==================

To install numpy run::

    python setup.py build -j 4 install --prefix $HOME/.local

This will compile numpy on 4 CPUs and install it into the specified prefix.
To perform an inplace build that can be run from the source folder run::

    python setup.py build_ext --inplace -j 4

Note that, due to the way most Linux distributions are handling the Python 3 migration, Linux users may have to replace the ``python`` command with ``python3``. See `Requirements for Installing Packages <https://packaging.python.org/tutorials/installing-packages/>`_ for more details.

The number of build jobs can also be specified via the environment variable
NPY_NUM_BUILD_JOBS.


Choosing compilers
==================

NumPy needs a C compiler, and for development versions also Cython.  A Fortran
compiler isn't needed to build NumPy itself; the ``numpy.f2py`` tests will be
skipped when running the test suite if no Fortran compiler is available.  For
building Scipy a Fortran compiler is needed though, so we include some details
on Fortran compilers in the rest of this section.
{'fraction_non_alphanumeric': 0.09258136244188397, 'fraction_numerical': 0.007681423084697796, 'mean_word_length': 3.8605108055009825, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 6, 'https://': 1, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '455296', 'n_tokens_mistral': 1418, 'n_tokens_neox': 1310, 'n_words': 647}